Commit 1b2c8f85 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix a bug in utils.EnsureDirs

This fixes a bug introduced in rev 2562 and also fixes the indentation.

Reviewed-by: ultrotter
parent b806661b
......@@ -1191,11 +1191,11 @@ def EnsureDirs(dirs):
"""
for dir_name, dir_mode in dirs:
try:
os.mkdir(dir_name, mode)
os.mkdir(dir_name, dir_mode)
except EnvironmentError, err:
if err.errno != errno.EEXIST:
raise errors.GenericError("Cannot create needed directory"
" '%s': %s" % (dir_name, err))
" '%s': %s" % (dir_name, err))
if not os.path.isdir(dir_name):
raise errors.GenericError("%s is not a directory" % dir_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment