66 lg.warning('There was something wrong with the data.json; fixing...')
67if not 'sha' in data.keys():
68 data['sha'] = {}
69if not 'last' in data.keys(): 70 lg.warning('No last update date found; setting standard')
71 data['last'] = '1999-12-01'
72
64 lg.warning('data.json not found; creating...')
65except json.JSONDecodeError:
66 lg.warning('There was something wrong with the data.json; fixing...')
67if not 'sha' in data.keys(): 68 data['sha'] = {}
69if not 'last' in data.keys():
70 lg.warning('No last update date found; setting standard')
Tests for membership should use the form x not in the_list
rather than not x in the_list
. The former example is simply more readable.
if not x in authors:
authors.append(x)
if x not in authors:
authors.append(x)