[sip] Factorisation et mise au propre des scripts pour asterisk
This commit is contained in:
parent
9b5c5eb93d
commit
399bf75dbe
20 changed files with 475 additions and 201 deletions
|
@ -2,9 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
from sh import grep,ErrorReturnCode_1
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
sys.path.append('/usr/scripts/')
|
||||
sys.path.append('/etc/crans/secrets/')
|
||||
|
||||
import lc_ldap.shortcuts
|
||||
|
||||
|
@ -15,7 +13,7 @@ try:
|
|||
except ValueError:
|
||||
sys.stdout.write('NONE')
|
||||
exit(0)
|
||||
login=conn.search("aid=%s" % aid)[0]['uid'][0]
|
||||
login=conn.search(u"aid=%s" % aid)[0]['uid'][0]
|
||||
try:
|
||||
sys.stdout.write(grep('-r',login,'/usr/scripts/var/digicode/').split('/')[-1].split(':')[0])
|
||||
except ErrorReturnCode_1: sys.stdout.write('NONE')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue