Fixed up some typos and misunderstanding of pythons dir system

This commit is contained in:
Benjamyn Love 2017-08-16 09:51:32 +10:00
parent 040e52d060
commit 26cd7b71e1

View File

@ -33,7 +33,7 @@ def openFile(filename):
myfile.write('records=A:MX:TXT:NS:SRV:SOA\n') myfile.write('records=A:MX:TXT:NS:SRV:SOA\n')
myfile.write('subdomains=www:mail') myfile.write('subdomains=www:mail')
myfile.close() myfile.close()
return 1 quit()
return myfile return myfile
def closeFile(fileObj): def closeFile(fileObj):
@ -53,12 +53,6 @@ def splitLines(confline):
retval.append(tmpLines[1].split(':')) retval.append(tmpLines[1].split(':'))
return retval return retval
testFile = openFile('.httpy')
test = testFile.read()
closeFile(testFile)
rec2check, sub2check = splitLines(test)
def printHelp(): def printHelp():
print bcolors.BLUE + "========================================================" print bcolors.BLUE + "========================================================"
print "= help - This screen =" print "= help - This screen ="
@ -219,7 +213,7 @@ def getInput():
running = 0 running = 0
#Main Loop #Main Loop
testFile = openFile('~/.httpy') testFile = openFile(os.path.expanduser('~/.httpy'))
test = testFile.read() test = testFile.read()
closeFile(testFile) closeFile(testFile)
rec2check, sub2check = splitLines(test) rec2check, sub2check = splitLines(test)