summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbup/_path.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lbup/_path.py b/lbup/_path.py
index 994611f..49cdec5 100644
--- a/lbup/_path.py
+++ b/lbup/_path.py
@@ -8,6 +8,9 @@ class AbsPath:
if path is not None:
if isinstance(path, str):
path = path.encode('utf-8')
+ else:
+ path = bytes(path)
+
if len(path) < 1 or not path.startswith(b'/'):
raise ValueError('Path does not look like valid absolute path', path)
components = filter(lambda x: len(x) > 0 and x != b'.', path[1:].split(b'/'))