Fixed up some typos and misunderstanding of pythons dir system
This commit is contained in:
parent
040e52d060
commit
26cd7b71e1
10
HTTPy.py
10
HTTPy.py
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user