summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-08-11 17:10:50 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-08-11 17:10:50 +0200
commitc837a1d7dba5388b89d3b1b23139f0d4d2558893 (patch)
tree7680050aca2d4260eebe9bdf8b4659489afa941e /giscanner
parenta03dd21d9cd5c6e634231ea6a29ac50fa7bb989c (diff)
downloadgobject-introspection-c837a1d7dba5388b89d3b1b23139f0d4d2558893.tar.gz
utils: fix undefined cdir variable
The docstring states that makedirs() was ported from python3, but this code part was missing. Found with newer pyflakes.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py
index f6cd0b4f..2feddab0 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -238,6 +238,9 @@ def makedirs(name, mode=0o777, exist_ok=False):
# be happy if someone already created the path
if e.errno != errno.EEXIST:
raise
+ cdir = os.path.curdir
+ if isinstance(tail, bytes):
+ cdir = os.path.curdir.encode("ascii")
if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists
return
try: