Address more pylint and py3 compatibility problems

This commit is contained in:
Ammar Askar committed 2015-04-03 02:25:34 +05:00
1 parent dcb2845ac4
commit c353d8bb86
6 files changed
+63 -55

No files matched your search

+5
View File
@@ -54,6 +54,11 @@ def minecraft_sha1_hash_digest(sha1_hash):
def _number_from_bytes(b, signed=False):
try:
return int.from_bytes(b, byteorder='big', signed=signed)
except AttributeError:
pass
if len(b) == 0:
b = b'\x00'
num = int(str(b).encode('hex'), 16)