Replaced the native commands to remove (os.remove())

This commit is contained in:
clamsawd 2015-10-29 16:56:05 +01:00
parent 46d0e04a25
commit 4bbf9c2885
2 changed files with 2 additions and 8 deletions

View File

@ -71,10 +71,7 @@ def writeip2ecf():
ip2ecf.write('ToEmail="'+ToEmail+'"\n')
ip2ecf.close()
if os.name == "posix":
os.system("rm ip2e-conf.py")
elif os.name == "nt":
os.system("del ip2e-conf.py")
os.remove("ip2e-conf.py")
createip2ecf()
writeip2ecf()
exec(open("ip2e-conf.py").read())

View File

@ -239,10 +239,7 @@ while PublicIP <= 2:
os.system("echo "+MailMessage+" to "+ToEmail+" >> ip2e.log")
os.system("echo [ip2e-daemon] ["+CurrentTime+"] Retrying in 5 seconds... >> ip2e.log")
time.sleep(5)
if os.name == "posix":
os.system("rm current-ip.py")
elif os.name == "nt":
os.system("del current-ip.py")
os.remove("current-ip.py")
def createNewip2eIPcf():
ip2eIPcf=open('current-ip.py','w')
ip2eIPcf.close()