Meilleure gestion de sys.path et des imports.
* Ajout de /usr/scripts aux paths * Déplacement de templates.py dans un endroit logique pour printing
This commit is contained in:
parent
996950b6df
commit
21c427ff9b
5 changed files with 6 additions and 5 deletions
|
@ -41,8 +41,10 @@ import base64
|
|||
import collections
|
||||
import hashlib
|
||||
import ldap.filter
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
import config
|
||||
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
from gestion import config
|
||||
from unicodedata import normalize
|
||||
import subprocess
|
||||
from netifaces import interfaces, ifaddresses, AF_INET
|
||||
|
|
|
@ -1 +1 @@
|
|||
from templates import *
|
||||
from templates.templates import *
|
||||
|
|
0
printing/templates/__init__.py
Normal file
0
printing/templates/__init__.py
Normal file
|
@ -7,11 +7,10 @@ import lc_ldap
|
|||
import attributs
|
||||
import objets
|
||||
import variables
|
||||
import config
|
||||
from gen_confs.dhcpd_new import dydhcp
|
||||
import sys
|
||||
if not '/usr/scripts' in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
from gestion.gen_confs.dhcpd_new import dydhcp
|
||||
import gestion.config as config
|
||||
|
||||
# liste des attributs dont dépend un service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue