major pep8 cleanup.
funneled scope of imports where possible fixed #59 Added fstrings where possible added logging both temporarily and in secondary places
This commit is contained in:
parent
47f2f61082
commit
61fcf3b80c
13 changed files with 131 additions and 121 deletions
|
@ -106,12 +106,12 @@ def connection_handler(session, request, verify):
|
|||
|
||||
|
||||
def mkdir_p(path):
|
||||
"""http://stackoverflow.com/a/600612/190597 (tzot)"""
|
||||
templogger = logging.getLogger('temp')
|
||||
try:
|
||||
logger.info('Creating folder %s ', path)
|
||||
templogger.info('Creating folder %s ', path)
|
||||
os.makedirs(path, exist_ok=True)
|
||||
except Exception as e:
|
||||
logger.error('Could not create folder %s : %s ', path, e)
|
||||
templogger.error('Could not create folder %s : %s ', path, e)
|
||||
|
||||
|
||||
def clean_sid_check(server_id_list, server_type=None):
|
||||
|
@ -123,7 +123,7 @@ def clean_sid_check(server_id_list, server_type=None):
|
|||
try:
|
||||
valid_sids.append(int(sid))
|
||||
except ValueError:
|
||||
logger.error("{} is not a valid server id number".format(sid))
|
||||
logger.error("%s is not a valid server id number", sid)
|
||||
if valid_sids:
|
||||
logger.info('%s : %s', t.upper(), valid_sids)
|
||||
return valid_sids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue