summaryrefslogtreecommitdiff
path: root/xnt/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'xnt/tasks.py')
-rw-r--r--xnt/tasks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/xnt/tasks.py b/xnt/tasks.py
index 7a3e79d..5140618 100644
--- a/xnt/tasks.py
+++ b/xnt/tasks.py
@@ -70,12 +70,13 @@ def mv(src, dst):
def mkdir(directory, mode=0o777):
"""Make a directory with mode"""
if os.path.exists(directory):
+ LOGGER.warning("Given directory (%s) already exists" % directory)
return
LOGGER.info("Making directory %s with mode %o", directory, mode)
try:
os.mkdir(directory, mode)
except IOError as io_error:
- log(io_error, logging.WARNING)
+ log(io_error, logging.ERROR)
except:
raise
@@ -92,7 +93,7 @@ def rm(*fileset):
else:
os.remove(file_to_delete)
except OSError as os_error:
- log(os_error, logging.WARNING)
+ log(os_error, logging.ERROR)
except:
raise