explicitly number format fields
This commit is contained in:
parent
c05e1091f3
commit
a41ff4c471
1 changed files with 4 additions and 4 deletions
|
@ -228,7 +228,7 @@ def get_time_today(args, use_ntlm_proxy=False):
|
||||||
'traceback': traceback.format_exc(),
|
'traceback': traceback.format_exc(),
|
||||||
}
|
}
|
||||||
log.error(exception_data)
|
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
|
return None, API_ERROR
|
||||||
|
|
||||||
except: # delete cached session when requests raises unknown exception
|
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(),
|
'traceback': traceback.format_exc(),
|
||||||
}
|
}
|
||||||
log.error(exception_data)
|
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
|
return None, API_ERROR
|
||||||
|
|
||||||
code = response.status_code if response is not None else None
|
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(),
|
'traceback': traceback.format_exc(),
|
||||||
}
|
}
|
||||||
log.error(exception_data)
|
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
|
return None, API_ERROR
|
||||||
else:
|
else:
|
||||||
if should_try_ntlm:
|
if should_try_ntlm:
|
||||||
|
@ -272,7 +272,7 @@ def get_time_today(args, use_ntlm_proxy=False):
|
||||||
'response_text': content,
|
'response_text': content,
|
||||||
})
|
})
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
return 'Error: {}'.format(code), API_ERROR
|
return 'Error: {0}'.format(code), API_ERROR
|
||||||
return None, API_ERROR
|
return None, API_ERROR
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue