improve adif support, look for station_callsign field

master
Jeff Laughlin 2016-09-28 22:18:48 -04:00
rodzic e342930cce
commit e9f7483fdc
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -69,7 +69,7 @@ class Reader(object):
self.header_present = True
for field in self._lex(blocksize=1):
if field.name == 'adif_ver':
self.adif_ver = Decimal(field.body)
self.adif_ver = field.body
elif field.name == 'eoh':
break
self.bookmark = flo.tell()

Wyświetl plik

@ -174,6 +174,9 @@ class Log(object):
pass
self.qsos.append(qso)
if self.qsos:
qso = self.qsos[0]
self.callsign = qso.get('station_callsign', None)
if not self.callsign:
self.callsign = qso.get('operator', None)
return self