Address more pylint and py3 compatibility problems
This commit is contained in:
1 parent
dcb2845ac4
commit
c353d8bb86
6 files changed
+63
-55
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user