Fixed import error on bin/freezerc
In bin/freezerc was being import the fail function from freezer/main.py but the function wasn't callable. Closes bug: 1465062 Change-Id: I0dcba66fd68550449c2a1c90144039e56e4ef915
This commit is contained in:
parent
257ea34d23
commit
fc9fb2ecde
@ -91,15 +91,6 @@ def freezer_main(args={}):
|
|||||||
except Exception as priority_error:
|
except Exception as priority_error:
|
||||||
logging.warning('[*] Priority: {0}'.format(priority_error))
|
logging.warning('[*] Priority: {0}'.format(priority_error))
|
||||||
|
|
||||||
def fail(exit_code, e, do_log=True):
|
|
||||||
""" Catch the exceptions and write it to log """
|
|
||||||
msg = '[*] Critical Error: {0}\n'.format(e)
|
|
||||||
if not backup_args.quiet:
|
|
||||||
sys.stderr.write(msg)
|
|
||||||
if do_log:
|
|
||||||
logging.critical(msg)
|
|
||||||
sys.exit(exit_code)
|
|
||||||
|
|
||||||
# Alternative aruments provision useful to run Freezer without
|
# Alternative aruments provision useful to run Freezer without
|
||||||
# command line e.g. functional testing
|
# command line e.g. functional testing
|
||||||
if args:
|
if args:
|
||||||
@ -127,3 +118,13 @@ def freezer_main(args={}):
|
|||||||
freezer_job.execute()
|
freezer_job.execute()
|
||||||
|
|
||||||
return backup_args
|
return backup_args
|
||||||
|
|
||||||
|
|
||||||
|
def fail(exit_code, e, do_log=True):
|
||||||
|
""" Catch the exceptions and write it to log """
|
||||||
|
msg = '[*] Critical Error: {0}\n'.format(e)
|
||||||
|
if not backup_args.quiet:
|
||||||
|
sys.stderr.write(msg)
|
||||||
|
if do_log:
|
||||||
|
logging.critical(msg)
|
||||||
|
sys.exit(exit_code)
|
||||||
|
Loading…
Reference in New Issue
Block a user