diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-08-11 17:10:50 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-08-11 17:10:50 +0200 |
commit | c837a1d7dba5388b89d3b1b23139f0d4d2558893 (patch) | |
tree | 7680050aca2d4260eebe9bdf8b4659489afa941e /giscanner/utils.py | |
parent | a03dd21d9cd5c6e634231ea6a29ac50fa7bb989c (diff) | |
download | gobject-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/utils.py')
-rw-r--r-- | giscanner/utils.py | 3 |
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: |