Cleanups, unused import, unused arguments removal

This commit is contained in:
Roberto Rosario
2014-11-02 23:21:14 -04:00
parent d65cd68aec
commit f52123cd7a
6 changed files with 14 additions and 121 deletions

View File

@@ -174,7 +174,8 @@ def validate_path(path):
# If doesn't exist try to create it
try:
os.mkdir(path)
except:
except Exception as exception:
logger.debug('unhandled exception: %s', exception)
return False
# Check if it is writable
@@ -182,7 +183,8 @@ def validate_path(path):
fd, test_filepath = tempfile.mkstemp(dir=path)
os.close(fd)
os.unlink(test_filepath)
except:
except Exception as exception:
logger.debug('unhandled exception: %s', exception)
return False
return True