explicitly number format fields

This commit is contained in:
Alan Hamlett 2019-05-07 18:20:22 -07:00
parent c05e1091f3
commit a41ff4c471

View file

@ -228,7 +228,7 @@ def get_time_today(args, use_ntlm_proxy=False):
'traceback': traceback.format_exc(),
}
log.error(exception_data)
return '{}: {}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return '{0}: {1}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return None, API_ERROR
except: # delete cached session when requests raises unknown exception
@ -242,7 +242,7 @@ def get_time_today(args, use_ntlm_proxy=False):
'traceback': traceback.format_exc(),
}
log.error(exception_data)
return '{}: {}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return '{0}: {1}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return None, API_ERROR
code = response.status_code if response is not None else None
@ -260,7 +260,7 @@ def get_time_today(args, use_ntlm_proxy=False):
'traceback': traceback.format_exc(),
}
log.error(exception_data)
return '{}: {}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return '{0}: {1}'.format(sys.exc_info()[0].__name__, u(sys.exc_info()[1])), API_ERROR
return None, API_ERROR
else:
if should_try_ntlm:
@ -272,7 +272,7 @@ def get_time_today(args, use_ntlm_proxy=False):
'response_text': content,
})
if log.isEnabledFor(logging.DEBUG):
return 'Error: {}'.format(code), API_ERROR
return 'Error: {0}'.format(code), API_ERROR
return None, API_ERROR