Small refactoring

This commit is contained in:
Thomas Lauf 2018-02-18 23:09:37 +01:00
parent b46ac77f64
commit f8ee042bf0

View file

@ -97,13 +97,12 @@ if 'temp.report.start' not in configuration:
print('There is no data in the database') print('There is no data in the database')
exit() exit()
if 'temp.report.end' not in configuration:
configuration.update( {
'temp.report.end': datetime.datetime.now().strftime( '%Y%m%dT%H%M%SZ' )
} )
start = datetime.datetime.strptime(configuration['temp.report.start'], DATEFORMAT) start = datetime.datetime.strptime(configuration['temp.report.start'], DATEFORMAT)
if 'temp.report.end' in configuration:
end = datetime.datetime.strptime(configuration['temp.report.end'], DATEFORMAT) end = datetime.datetime.strptime(configuration['temp.report.end'], DATEFORMAT)
else:
end = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
if max_width > 0: if max_width > 0:
# Compose report header. # Compose report header.