diff --git a/ip2e-config.py b/ip2e-config.py index a022411..7c52000 100755 --- a/ip2e-config.py +++ b/ip2e-config.py @@ -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()) diff --git a/ip2e-daemon.py b/ip2e-daemon.py index 8286ada..35767a3 100755 --- a/ip2e-daemon.py +++ b/ip2e-daemon.py @@ -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()