Correction des import crans.utils partout
Ça semble provoquer des erreurs d'import, donc autant tout corriger
This commit is contained in:
parent
c3e28ac9c1
commit
31bb376741
4 changed files with 23 additions and 14 deletions
|
@ -31,9 +31,15 @@
|
|||
# Début : Ajout log pour réestimer les coûts
|
||||
import time
|
||||
# Fin
|
||||
import sys, tempfile, os, commands, shutil, syslog, stat
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from crans.utils import QuoteForPOSIX as escapeForShell
|
||||
import sys
|
||||
import tempfile
|
||||
import os
|
||||
import commands
|
||||
import shutil
|
||||
import syslog
|
||||
import stat
|
||||
sys.path.append('/usr/scripts/')
|
||||
from lib.utils import QuoteForPOSIX as escapeForShell
|
||||
def __init__():
|
||||
pass
|
||||
|
||||
|
@ -42,7 +48,7 @@ def __init__():
|
|||
# ########################################################### #
|
||||
#
|
||||
#
|
||||
import config.impression
|
||||
from gestion import config.impression
|
||||
COUT_UNITE_COULEUR = config.impression.c_coul
|
||||
COUT_UNITE_NOIRE = config.impression.c_noir
|
||||
COUT_PASSAGE_TAMBOUR_NOIR = config.impression.c_tambour_noir
|
||||
|
|
|
@ -34,7 +34,8 @@ import sys, os.path
|
|||
sys.path.append('/usr/scripts/gestion')
|
||||
from config import impression as config_impression
|
||||
from commands import getstatusoutput
|
||||
import crans.utils.logs
|
||||
sys.path.append('/usr/scripts/')
|
||||
from lib.utils import logs
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
# ######################################################## #
|
||||
|
@ -188,7 +189,7 @@ class impression:
|
|||
"""
|
||||
|
||||
# On ouvre les logs
|
||||
self.log = crans.utils.logs.getFileLogger('impression')
|
||||
self.log = logs.getFileLogger('impression')
|
||||
|
||||
self._fichier = path_to_pdf
|
||||
self._adh = adh
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
import re, commands
|
||||
import crans.utils.logs
|
||||
import re
|
||||
import commands
|
||||
import sys
|
||||
sys.path.append('/usr/scripts/')
|
||||
import lib.utils.logs
|
||||
import logging
|
||||
LOGGER = logging.getLogger("crans.autologout")
|
||||
LOGGER.addHandler(crans.utils.logs.CransFileHandler("autologout"))
|
||||
LOGGER.addHandler(lib.utils.logs.CransFileHandler("autologout"))
|
||||
LOGGER.setLevel(logging.WARNING)
|
||||
|
||||
def run_autologout():
|
||||
|
@ -15,11 +18,8 @@ def run_autologout():
|
|||
# on splite
|
||||
w = w.split()
|
||||
|
||||
if w[0] in ['cohen','segaud']:
|
||||
continue
|
||||
|
||||
# on verifie que c'est une connection du bde
|
||||
hosts = ['bde.crans.org','cableur.crans.org','cableuse.crans.org','venus.crans.org']
|
||||
hosts = ['cableur.crans.org','cableuse.crans.org','venus.crans.org','kfet.crans.org']
|
||||
if w[2] not in [ h[0:16] for h in hosts ] :
|
||||
continue
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
|
||||
import logging
|
||||
|
||||
from crans.utils.logs import getFileLogger
|
||||
import sys
|
||||
sys.path.append('/usr/scripts/')
|
||||
from lib.utils.logs import getFileLogger
|
||||
#LOGGER = logging.getLogger("crans.scripts.test")
|
||||
LOGGER = getFileLogger("helloworld")
|
||||
LOGGER.setLevel(logging.INFO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue