mirror of
https://codeberg.org/mclemens/qrzlogger.git
synced 2024-10-01 09:55:57 -04:00
user can now retry if upload failed
This commit is contained in:
parent
5d1de2096f
commit
b517e87bc6
@ -336,6 +336,7 @@ class QRZLogger():
|
|||||||
data = urllib.parse.urlencode(post_data)
|
data = urllib.parse.urlencode(post_data)
|
||||||
# send the POST request to QRZ.com
|
# send the POST request to QRZ.com
|
||||||
response = self.send_request(data)
|
response = self.send_request(data)
|
||||||
|
|
||||||
# Check if the upload failed and print out
|
# Check if the upload failed and print out
|
||||||
# the reason plus some additional info
|
# the reason plus some additional info
|
||||||
if response:
|
if response:
|
||||||
@ -530,7 +531,17 @@ class QRZLogger():
|
|||||||
self.defvalcol + "y/n/c/quit" + self.inputcol + "]: " + attr('reset'))
|
self.defvalcol + "y/n/c/quit" + self.inputcol + "]: " + attr('reset'))
|
||||||
answer = answer.upper()
|
answer = answer.upper()
|
||||||
if answer == "Y":
|
if answer == "Y":
|
||||||
|
while True:
|
||||||
logid = self.send_qso(self.qso, call)
|
logid = self.send_qso(self.qso, call)
|
||||||
|
if logid and logid != "null":
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
answer = input("\n" + self.inputcol + "QSO Upload failed. Retry? [" + \
|
||||||
|
self.defvalcol + "y/n" + self.inputcol + "]: " + attr('reset'))
|
||||||
|
answer = answer.upper()
|
||||||
|
if answer == "N":
|
||||||
|
done = True
|
||||||
|
break
|
||||||
if logid and logid.lower() != "null":
|
if logid and logid.lower() != "null":
|
||||||
# pull the uploaded QSO from QRZ
|
# pull the uploaded QSO from QRZ
|
||||||
result = self.get_qsos("LOGIDS:"+ logid)
|
result = self.get_qsos("LOGIDS:"+ logid)
|
||||||
@ -542,6 +553,8 @@ class QRZLogger():
|
|||||||
self.recent_qsos.pop(0)
|
self.recent_qsos.pop(0)
|
||||||
done = True
|
done = True
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
break
|
||||||
elif answer == "C":
|
elif answer == "C":
|
||||||
done = True
|
done = True
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user