Fix compatibility with Python < 3.5
This commit is contained in:
parent
ee3fb71f7d
commit
282a759174
@ -311,7 +311,7 @@ def path_to_filesystem(root, *paths):
|
||||
|
||||
def left_encode_int(v):
|
||||
length = int(log(v, 256)) + 1 if v != 0 else 1
|
||||
return b"%c%s" % (length, v.to_bytes(length, 'little'))
|
||||
return bytes((length,)) + v.to_bytes(length, 'little')
|
||||
|
||||
|
||||
class UnsafePathError(ValueError):
|
||||
|
Loading…
Reference in New Issue
Block a user