diff options
Diffstat (limited to 'giscanner/utils.py')
-rw-r--r-- | giscanner/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py index df512d7b..4865ca8c 100644 --- a/giscanner/utils.py +++ b/giscanner/utils.py @@ -228,7 +228,7 @@ def makedirs(name, mode=0o777, exist_ok=False): if head and tail and not os.path.exists(head): try: makedirs(head, mode, exist_ok) - except OSError as e: + except (IOError, OSError) as e: # be happy if someone already created the path if e.errno != errno.EEXIST: raise @@ -236,7 +236,7 @@ def makedirs(name, mode=0o777, exist_ok=False): return try: os.mkdir(name, mode) - except OSError as e: + except (IOError, OSError) as e: if not exist_ok or e.errno != errno.EEXIST or not os.path.isdir(name): raise |