Skip to content

Commit

Permalink
Fix compatibility with Python < 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Sep 11, 2017
1 parent ee3fb71 commit 282a759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radicale/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 282a759

Please sign in to comment.