Skip to content

Commit

Permalink
fix: #1 error handle
Browse files Browse the repository at this point in the history
  • Loading branch information
cebarobot committed Oct 11, 2022
1 parent 7511ba6 commit 8332b7c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions JARL/cal_jarl.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def get_info_for_qsl_list(idx, one_qso, remarks):
qsos, header = adif_io.read_from_file(adif_file)

for one_qso in qsos:
if one_qso['COUNTRY'] != "JAPAN":
if 'COUNTRY' not in one_qso or one_qso['COUNTRY'] != "JAPAN":
continue
if not 'STATE' in one_qso:
if 'STATE' not in one_qso:
continue
if not 'CNTY' in one_qso:
if 'CNTY' not in one_qso:
continue

this_call = one_qso['CALL']
Expand All @@ -95,6 +95,11 @@ def get_info_for_qsl_list(idx, one_qso, remarks):
if not this_pref in waja:
waja[this_pref] = one_qso

if this_no not in no_list:
continue

# TODO: check delete JCC/JCG/Ku with delete Date

this_no_info = no_list[this_no]
this_no_type = this_no_info['type']

Expand Down

0 comments on commit 8332b7c

Please sign in to comment.