Don't go through loop if not Python 3; fixed typo
This commit is contained in:
parent
6e325a9190
commit
a72c6eac96
@ -1281,9 +1281,10 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
"""
|
||||
if isinstance(key, tuple):
|
||||
#create a byte string key, first validity check in python 3!
|
||||
if sys.version_info[0] >= 3:
|
||||
for val in key:
|
||||
if sys.version_info[0] >= 3 and isinstance(val, bytes):
|
||||
raise DbError(_('An attempt is made to safe a reference key '
|
||||
if isinstance(val, bytes):
|
||||
raise DbError(_('An attempt is made to save a reference key '
|
||||
'which is partly bytecode, this is not allowed.\n'
|
||||
'Key is %s') % str(key))
|
||||
key = str(key)
|
||||
|
Loading…
Reference in New Issue
Block a user