From 5b66ae009502eca7034e968060344739055c02bd Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Thu, 23 Jul 2015 17:25:11 +0200 Subject: [PATCH] /usr/scripts sans / final --- lc_ldap.py | 7 +++---- objets.py | 6 +++--- shortcuts.py | 2 +- test.py | 2 -- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lc_ldap.py b/lc_ldap.py index 8d9f0a6..9f4f7b4 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # # LC_LDAP.PY-- LightWeight CransLdap @@ -53,9 +52,9 @@ import variables import copy import itertools -## import de /usr/scripts/ -if not "/usr/scripts/" in sys.path: - sys.path.append('/usr/scripts/') +## import de /usr/scripts +if "/usr/scripts" not in sys.path: + sys.path.append('/usr/scripts') import gestion.config as config import cranslib.deprecated diff --git a/objets.py b/objets.py index 52e8472..eea54ab 100644 --- a/objets.py +++ b/objets.py @@ -56,9 +56,9 @@ import ldap_locks import variables import printing -## import de /usr/scripts/ -if not "/usr/scripts/" in sys.path: - sys.path.append('/usr/scripts/') +## import de /usr/scripts +if "/usr/scripts" not in sys.path: + sys.path.append('/usr/scripts') import gestion.config as config import gestion.config.impression diff --git a/shortcuts.py b/shortcuts.py index 13a1a49..6671272 100644 --- a/shortcuts.py +++ b/shortcuts.py @@ -15,7 +15,7 @@ try: from gestion import secrets_new as secrets except ImportError: sys.stderr.write("lc_ldap shortcuts: shaa, cannot import secrets_new. " + - "try again with /usr/scripts/ in PYTHONPATH " + + "try again with /usr/scripts in PYTHONPATH " + "(argv: %s)\n" % " ".join(getattr(sys, 'argv', []))) sys.path.append("/usr/scripts") from gestion import secrets_new as secrets diff --git a/test.py b/test.py index 8cd5591..ba7953d 100755 --- a/test.py +++ b/test.py @@ -14,8 +14,6 @@ import lc_ldap import shortcuts import variables -## import dans /usr/scripts/ -sys.path.append("/usr/scripts/") from gestion.affich_tools import anim, OK, cprint, ERREUR mail_format = False