fixes #62 "TypeError: argument of type 'int' is not iterable"

This commit is contained in:
Bora M. Alper 2017-06-06 14:33:11 +03:00
parent a0ee71a81d
commit 3960915812

View File

@ -81,7 +81,7 @@ class Database:
assert type(info[b"length"]) is int
files.append((info_hash, info[b"length"], name))
# TODO: Make sure this catches ALL, AND ONLY operational errors
except (bencode.BencodeDecodingError, AssertionError, KeyError, AttributeError, UnicodeDecodeError):
except (bencode.BencodeDecodingError, AssertionError, KeyError, AttributeError, UnicodeDecodeError, TypeError):
return False
self.__pending_metadata.append((info_hash, name, sum(f[1] for f in files), discovered_on))