From: Salesman bot IRC Date: Wed, 18 Jul 2012 20:01:08 +0000 (+0200) Subject: Oubli du check de l'option --daemon X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fsalesman.git;a=commitdiff_plain;h=b9a1cf5598517ab2e26e3786e77913e6096347f6 Oubli du check de l'option --daemon --- diff --git a/capitales.txt b/capitales.txt index bdcf7e2..7f1996d 100644 --- a/capitales.txt +++ b/capitales.txt @@ -74,7 +74,7 @@ 73 | Prague | République tchèque 74 | Praia | Cap-Vert 75 | Putrajaya | Malaisie - 76 | Pyinmana | Birmanie + 76 | Naypyidaw | Birmanie 77 | Quito | Équateur 78 | Rangoon | Birmanie 79 | Riga | Lettonie diff --git a/salesman.py b/salesman.py index e25a8d8..cd25494 100755 --- a/salesman.py +++ b/salesman.py @@ -634,7 +634,13 @@ if __name__=="__main__": print " --outfile sans --no-output ni --daemon n'a aucun effet" exit(1) serveur=sys.argv[1] - + if "--daemon" in sys.argv: + thisfile = os.path.realpath(__file__) + thisdirectory = thisfile.rsplit("/", 1)[0] + os.chdir(thisdirectory) + daemon = True + else: + daemon = False if "debug" in sys.argv or "--debug" in sys.argv: debug=True else: