From b9a1cf5598517ab2e26e3786e77913e6096347f6 Mon Sep 17 00:00:00 2001 From: Salesman bot IRC Date: Wed, 18 Jul 2012 22:01:08 +0200 Subject: [PATCH] Oubli du check de l'option --daemon --- capitales.txt | 2 +- salesman.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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: -- 2.39.2