Commit 75a4d6b8 authored by Vincent Le gallic's avatar Vincent Le gallic
Browse files

[impression/digicode.py] import foireux de crans.utils

parent db2b0f0a
......@@ -25,8 +25,15 @@
Copyright (c) 2006, 2007, 2008, 2009 by Cr@ns (http://www.crans.org)
"""
import sys, time, tempfile, os, commands, string, random
import crans.utils.files
import sys
import time
import tempfile
import os
import commands
import string
import random
sys.path.append("/usr/scripts/")
import lib.utils.files
# #############################################################
# CONSTANTES
# #############################################################
......@@ -125,7 +132,7 @@ def list_code():
files = os.listdir(CODES_DIR)
code_list = []
for aCode in files:
age = crans.utils.files.ageOfFile(os.path.join(CODES_DIR, aCode ) )
age = lib.utils.files.ageOfFile(os.path.join(CODES_DIR, aCode ) )
content = read_code_file(aCode)
code_list.append((aCode, age, content ) )
return code_list
......@@ -154,5 +161,5 @@ def menage():
for aFile in fileList:
aFilePath = os.path.join(CODES_DIR, aFile)
if os.path.isfile(aFilePath):
if crans.utils.files.fileIsOlderThan(aFilePath, days=1):
if lib.utils.files.fileIsOlderThan(aFilePath, days=1):
os.remove(aFilePath)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment