last QSO table will not be shown anymore if there are no previous QSOs
This commit is contained in:
parent
0cc4406664
commit
1b45024d4b
15
qrzlogger.py
15
qrzlogger.py
|
@ -151,7 +151,6 @@ def getQSOsForCallsign(callsign):
|
||||||
v = re.sub('^.*:',"",i, flags=re.DOTALL)
|
v = re.sub('^.*:',"",i, flags=re.DOTALL)
|
||||||
k = re.sub(':.*$',"",i, flags=re.DOTALL)
|
k = re.sub(':.*$',"",i, flags=re.DOTALL)
|
||||||
result[-1][k] = v
|
result[-1][k] = v
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,13 +334,13 @@ if __name__ == '__main__':
|
||||||
print(tab)
|
print(tab)
|
||||||
print(style.RESET)
|
print(style.RESET)
|
||||||
|
|
||||||
print ('%s%sPrevious QSOs with %s%s' % (style.UNDERLINED, hlcol, call, style.RESET))
|
|
||||||
|
|
||||||
result = getQSOsForCallsign(call)
|
result = getQSOsForCallsign(call)
|
||||||
tab = getQSOTable(result)
|
if result[0]:
|
||||||
print(tablecol)
|
print ('%s%sPrevious QSOs with %s%s' % (style.UNDERLINED, hlcol, call, style.RESET))
|
||||||
print(tab)
|
tab = getQSOTable(result)
|
||||||
print(style.RESET)
|
print(tablecol)
|
||||||
|
print(tab)
|
||||||
|
print(style.RESET)
|
||||||
|
|
||||||
print ('%s%sEnter new QSO details below%s\n' % (style.UNDERLINED, hlcol, style.RESET))
|
print ('%s%sEnter new QSO details below%s\n' % (style.UNDERLINED, hlcol, style.RESET))
|
||||||
|
|
||||||
|
@ -383,5 +382,5 @@ if __name__ == '__main__':
|
||||||
keeponlogging = False
|
keeponlogging = False
|
||||||
|
|
||||||
print(inputcol)
|
print(inputcol)
|
||||||
print("Bye, bye!")
|
print("73!")
|
||||||
print(style.RESET)
|
print(style.RESET)
|
||||||
|
|
Loading…
Reference in New Issue