catch when the user tries to view the application before they've made one
This commit is contained in:
parent
142f401eca
commit
76f9c62a52
@ -112,9 +112,12 @@ def loadFile() :
|
|||||||
global application
|
global application
|
||||||
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
applicationFile = applicationDir+"/"+handle+".dat"
|
applicationFile = applicationDir+"/"+handle+".dat"
|
||||||
|
if os.path.exists(applicationFile) :
|
||||||
file = open(applicationFile, 'rb')
|
file = open(applicationFile, 'rb')
|
||||||
application = pickle.load(file)
|
application = pickle.load(file)
|
||||||
file.close()
|
file.close()
|
||||||
|
else :
|
||||||
|
writeln("|CLSorry you need to create an application first|CL|PA")
|
||||||
|
|
||||||
def sendEmail() :
|
def sendEmail() :
|
||||||
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
@ -212,6 +215,7 @@ def addEditApplication() :
|
|||||||
pktPassword = ""
|
pktPassword = ""
|
||||||
ticPassword = ""
|
ticPassword = ""
|
||||||
numNodes = ""
|
numNodes = ""
|
||||||
|
cramMD5 = ""
|
||||||
bbsSoftware = ""
|
bbsSoftware = ""
|
||||||
|
|
||||||
# left side
|
# left side
|
||||||
@ -281,6 +285,9 @@ def addEditApplication() :
|
|||||||
# view existing application
|
# view existing application
|
||||||
def viewApplication() :
|
def viewApplication() :
|
||||||
initMainScreen()
|
initMainScreen()
|
||||||
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
|
applicationFile = applicationDir+"/"+handle+".dat"
|
||||||
|
if os.path.exists(applicationFile) :
|
||||||
loadFile()
|
loadFile()
|
||||||
apDict = application[handle]
|
apDict = application[handle]
|
||||||
realName = apDict["realName"]
|
realName = apDict["realName"]
|
||||||
@ -322,6 +329,9 @@ def viewApplication() :
|
|||||||
gotoxy(59,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,18); write("|"+normBG+"|"+normColour+"BBS Software: "+"|"+fieldBG+"|"+fieldFG+bbsSoftware+"|"+normBG)
|
gotoxy(59,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,18); write("|"+normBG+"|"+normColour+"BBS Software: "+"|"+fieldBG+"|"+fieldFG+bbsSoftware+"|"+normBG)
|
||||||
gotoxy(1,23); write("|PA")
|
gotoxy(1,23); write("|PA")
|
||||||
|
|
||||||
|
else :
|
||||||
|
writeln("|CRYou don't yet have a saved application.|CR|PA")
|
||||||
|
|
||||||
# pull network config first ready for main program to start
|
# pull network config first ready for main program to start
|
||||||
getNetCfg(ARG)
|
getNetCfg(ARG)
|
||||||
initMainScreen()
|
initMainScreen()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user