pull/68/head
Konstantin Gründger 2017-10-03 15:35:22 +02:00
rodzic bad47bdff6
commit 32b6150728
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -36,7 +36,7 @@ def convert(sourcefile, path=''):
match = re.search('^.+\.txt\_(\d{4}\-\d{2}\-\d{2})(\.gz)?$', sourcefile) match = re.search('^.+\.txt\_(\d{4}\-\d{2}\-\d{2})(\.gz)?$', sourcefile)
if match: if match:
reference_date_string = match.group(1) reference_date_string = match.group(1)
reference_date = datetime.strptime(reference_date_string, "%Y-%m-%d") reference_date = datetime.datetime.strptime(reference_date_string, "%Y-%m-%d")
else: else:
print("filename '{}' does not match pattern. Skipping".format(sourcefile)) print("filename '{}' does not match pattern. Skipping".format(sourcefile))
return return

Wyświetl plik

@ -94,7 +94,7 @@ class AircraftBeacon(Beacon):
def get_csv_values(self): def get_csv_values(self):
return [ return [
self.location_wkt, self.location_wkt,
int(self.altitude), int(self.altitude) if self.altitude else None,
self.name, self.name,
self.receiver_name, self.receiver_name,
self.timestamp, self.timestamp,