Dans la série suppression des liens symboliques : /usr/scripts/lib devient /usr/scripts/cranslib
* Comme ça c'est plus clair que c'est un truc custom crans * Le lien symbolique /usr/scripts/gestion/crans/ est retiré. D'autres suivront.
This commit is contained in:
parent
c57795f23b
commit
10275229a1
35 changed files with 20 additions and 29 deletions
41
cranslib/cp.py
Normal file
41
cranslib/cp.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
# #############################################################
|
||||
# ..
|
||||
# .... ............ ........
|
||||
# . ....... . .... ..
|
||||
# . ... .. .. .. .. ..... . ..
|
||||
# .. .. ....@@@. .. . ........ .
|
||||
# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
|
||||
# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
|
||||
# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
|
||||
# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
|
||||
# ...@@@.... @@@ .@@.......... ........ ..... ..
|
||||
# . ..@@@@.. . .@@@@. .. ....... . .............
|
||||
# . .. .... .. .. . ... ....
|
||||
# . . .... ............. .. ...
|
||||
# .. .. ... ........ ... ...
|
||||
# ................................
|
||||
#
|
||||
# #############################################################
|
||||
"""
|
||||
cp.py
|
||||
|
||||
Fonctions pour cherrypy (intranet)
|
||||
|
||||
Copyright (c) 2006 by www.crans.org
|
||||
"""
|
||||
import cherrypy
|
||||
|
||||
def log(string, keyword = "INTRANET", level = 0):
|
||||
"""Utilise la fonction log de cherrypy avec quelques modification
|
||||
|
||||
-> introduit le login de la session en cours s'il existe
|
||||
"""
|
||||
try:
|
||||
login = cherrypy.session['uid']
|
||||
string = u"[%s] %s" % ( login, string )
|
||||
except:
|
||||
pass
|
||||
string = string.encode("utf-8")
|
||||
cherrypy.log(string, keyword, level)
|
Loading…
Add table
Add a link
Reference in a new issue