diff options
Diffstat (limited to 'rtemstoolkit/path.py')
-rw-r--r-- | rtemstoolkit/path.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rtemstoolkit/path.py b/rtemstoolkit/path.py index 6b63c8a..845dfe8 100644 --- a/rtemstoolkit/path.py +++ b/rtemstoolkit/path.py @@ -126,17 +126,17 @@ def mkdir(path): os.makedirs(host(path)) except IOError: raise error.general('cannot make directory: %s' % (path)) - except OSError: - raise error.general('cannot make directory: %s' % (path)) - except WindowsError: - raise error.general('cannot make directory: %s' % (path)) + except OSError as e: + raise error.general('cannot make directory: %s: %s' % (path, str(e))) + except WindowsError as e: + raise error.general('cannot make directory: %s: %s' % (path, str(e))) else: try: os.makedirs(host(path)) except IOError: raise error.general('cannot make directory: %s' % (path)) - except OSError: - raise error.general('cannot make directory: %s' % (path)) + except OSError as e: + raise error.general('cannot make directory: %s: %s' % (path, str(e))) def removeall(path): |