summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Kumar Banerjee <vijaykumar9597@gmail.com>2019-05-20 16:54:27 +0530
committerChris Johns <chrisj@rtems.org>2019-05-21 15:53:38 +1000
commit6c79a16e209e9f61904114ad82bac650417508e2 (patch)
treecc6bf7830e48a620a8a2974aa65215d59d044f91
parentrtemstoolkit/path : Add listdir function (diff)
downloadrtems-tools-6c79a16e209e9f61904114ad82bac650417508e2.tar.bz2
rtemstoolkit/path : print OSError in mkdir
-rw-r--r--rtemstoolkit/path.py12
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):