fix unknown address

This commit is contained in:
MeaTLoTioN 2022-05-21 16:10:13 +01:00
parent 3867cb4ec0
commit 145bd19d09

View File

@ -230,6 +230,8 @@ def showDetail(BBS):
except: except:
rating = 0 rating = 0
address = dictNodelist[BBS]["ADDRESS"] address = dictNodelist[BBS]["ADDRESS"]
if not address:
address = "Unknown"
port = dictNodelist[BBS]["PORT"] port = dictNodelist[BBS]["PORT"]
node_addresses = dictNodelist[BBS]["NODE_ADDRESSES"] node_addresses = dictNodelist[BBS]["NODE_ADDRESSES"]
drawWindow(15,4,65,20,bbs) drawWindow(15,4,65,20,bbs)
@ -256,7 +258,7 @@ def showDetail(BBS):
gotoxy(18,18); write("|13[ |15Q to go back |13]") gotoxy(18,18); write("|13[ |15Q to go back |13]")
gotoxy(35,18); write("|13[ |10"+(chr(254)*rating).ljust(7)+" |13]") gotoxy(35,18); write("|13[ |10"+(chr(254)*rating).ljust(7)+" |13]")
if address and "Private" not in address: if address and "Private" not in address and "Unknown" not in address:
gotoxy(47,18); write("|13[ |15C to connect |13]") gotoxy(47,18); write("|13[ |15C to connect |13]")
else: else:
gotoxy(47,18); write("|13[ |08C to connect |13]") gotoxy(47,18); write("|13[ |08C to connect |13]")
@ -267,7 +269,7 @@ def showDetail(BBS):
if ch == 'Q': if ch == 'Q':
canend = "yes" canend = "yes"
if ch == 'C': if ch == 'C':
if address and "Private" not in address: if address and "Private" not in address and "Unknown" not in address:
write('|SS'); write('|CL') write('|SS'); write('|CL')
menucmd('IT','/addr='+address+' /port='+str(port)) menucmd('IT','/addr='+address+' /port='+str(port))
write('[0;26 D'); write('|RS') write('[0;26 D'); write('|RS')