import_logfile: Add reference_date argument

pull/59/head
Fabian P. Schmidt 2016-09-28 11:41:44 +02:00
rodzic ac03cc2ab6
commit 2b69ef5cac
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -43,8 +43,8 @@ def run(aprs_user='anon-dev', logfile='main.log', loglevel='INFO'):
@manager.command
def import_logfile(ogn_logfile, logfile='main.log', loglevel='INFO'):
"""Import OGN-data from ogn-log-files <arg: ogn-logfile>."""
def import_logfile(ogn_logfile, reference_date, logfile='main.log', loglevel='INFO'):
"""Import OGN-data from ogn-log-files <arg: ogn-logfile, reference_date>. Reference date must be given in YYYY-MM-DD."""
# Check if filename exists
try:
@ -61,7 +61,7 @@ def import_logfile(ogn_logfile, logfile='main.log', loglevel='INFO'):
print('Start importing ogn-logfile')
for line in f:
process_beacon(line)
process_beacon(line, reference_date)
f.close()
logging.shutdown()