From f921073835dbb4950449f593fb66efdd9bcf9511 Mon Sep 17 00:00:00 2001 From: clamsawd Date: Mon, 9 Nov 2015 11:08:13 +0100 Subject: [PATCH] Internal changes in the source code --- ip2e-daemon.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip2e-daemon.py b/ip2e-daemon.py index 1870c0f..3c5ec64 100755 --- a/ip2e-daemon.py +++ b/ip2e-daemon.py @@ -5,7 +5,7 @@ # ip2e (IP to email) - Run ip2e daemon. | # Created by clamsawd (clamsawd@openmailbox.org) | # Licensed by GPL v.3 | -# Last update: 06-11-2015 | +# Last update: 09-11-2015 | # | # Compatible with Python 3.x | # -------------------------------------------------------------- @@ -40,9 +40,11 @@ def ClearScreen(): #Detect system & PATH of user folder if os.name == "posix": os.chdir(os.environ["HOME"]) + LogFile=os.environ["HOME"]+"/.ip2e/ip2e.log" print ("POSIX detected") elif os.name == "nt": os.chdir(os.environ["USERPROFILE"]) + LogFile=os.environ["USERPROFILE"]+"\\.ip2e\\ip2e.log" print ("Windows detected") if not os.path.exists(".ip2e"): @@ -113,10 +115,7 @@ editlog=open('ip2e.log','a') CurrentTime = time.strftime("%H:%M") GreenColor() print ("[ip2e-daemon] ["+CurrentTime+"] Initialized ip2e-daemon v"+version+" (Ctrl+C to stop)") -if os.name == "posix": - print ("[ip2e-daemon] ["+CurrentTime+"] Log in "+os.environ["HOME"]+"/.ip2e/ip2e.log") -elif os.name == "nt": - print ("[ip2e-daemon] ["+CurrentTime+"] Log in "+os.environ["USERPROFILE"]+"\.ip2e\\ip2e.log") +print ("[ip2e-daemon] ["+CurrentTime+"] Log in "+LogFile) editlog.write("[ip2e-daemon] ["+CurrentTime+"] Initialized ip2e-daemon v"+version+"\n") OrangeColor() print ("[ip2e-daemon] ["+CurrentTime+"] Waiting 60 seconds...")