[Checkins] SVN: z3c.coverage/trunk/src/z3c/coverage/coveragereport.py Refactoring: stop reinventing os.makedirs().
Marius Gedminas
cvs-admin at zope.org
Wed Sep 5 13:02:22 UTC 2012
Log message for revision 127716:
Refactoring: stop reinventing os.makedirs().
Changed:
U z3c.coverage/trunk/src/z3c/coverage/coveragereport.py
-=-
Modified: z3c.coverage/trunk/src/z3c/coverage/coveragereport.py
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/coveragereport.py 2012-09-05 13:02:12 UTC (rev 127715)
+++ z3c.coverage/trunk/src/z3c/coverage/coveragereport.py 2012-09-05 13:02:19 UTC (rev 127716)
@@ -370,14 +370,8 @@
def create_report_path(report_path):
- report_path = os.path.abspath(report_path)
- missing_dirs = []
- while not os.path.exists(report_path):
- report_path, missing_dir = os.path.split(report_path)
- missing_dirs.append(missing_dir)
- while missing_dirs:
- report_path = os.path.join(report_path, missing_dirs.pop())
- os.mkdir(report_path)
+ if not os.path.exists(report_path):
+ os.makedirs(report_path)
def filter_fn(filename):
More information about the checkins
mailing list