'Create a new unique row identifier'

def __new_rowid(self, table, txn):

    unique = 0
    while (not unique):
        blist = []
        for x in xrange(_rowid_str_len):
            blist.append(random.randint(0, 255))
        newid = struct.pack(('B' * _rowid_str_len), *blist)
        if (sys.version_info[0] >= 3):
            newid = newid.decode('iso8859-1')
        try:
            self.db.put(_rowid_key(table, newid), None, txn=txn, flags=db.DB_NOOVERWRITE)
        except db.DBKeyExistError:
            pass
        else:
            unique = 1
    return newid
