Merge "Fix removing temp file"
This commit is contained in:
commit
f320b35137
|
@ -225,7 +225,7 @@ def main():
|
|||
if CONF.action not in ['start', 'stop', 'status', 'reload']:
|
||||
sys.stderr.write("Using freezer-scheduler as a command line client is "
|
||||
"deprecated. Please use the freezer command line tool"
|
||||
" from python-freezerclient.")
|
||||
" from python-freezerclient.\n")
|
||||
|
||||
apiclient = None
|
||||
insecure = False
|
||||
|
|
|
@ -283,5 +283,4 @@ class Backup(object):
|
|||
metadata_content = f.readlines()
|
||||
LOG.info("metadata content download {0}".format(metadata_content))
|
||||
metadata_file.close()
|
||||
utils.delete_file(metadata_file.name)
|
||||
return json.loads(metadata_content[0])
|
||||
|
|
|
@ -364,8 +364,9 @@ def delete_file(path_to_file):
|
|||
"""
|
||||
try:
|
||||
os.remove(path_to_file)
|
||||
except Exception:
|
||||
LOG.warning("Error deleting file {0}".format(path_to_file))
|
||||
except Exception as e:
|
||||
LOG.warning("Error deleting file {0}:\n{1}".format(path_to_file,
|
||||
str(e)))
|
||||
|
||||
|
||||
def walk_path(path, exclude, ignorelinks, callback, *kargs, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue