summaryrefslogtreecommitdiffstats
path: root/django/sp_sso/invite/utils.py
diff options
context:
space:
mode:
authorPaul Marillonnet <pmarillonnet@entrouvert.com>2017-06-29 15:51:03 (GMT)
committerPaul Marillonnet <pmarillonnet@entrouvert.com>2017-06-29 15:51:03 (GMT)
commit514dfee6f98b6e016076d1dbeff5e2b707b5cbf6 (patch)
tree1799a367f219da908e37cadcb92ac98e011349a6 /django/sp_sso/invite/utils.py
parent214c5fb3d87775ed6963616388c19bde92922e9f (diff)
downloadpaul-synchro-514dfee6f98b6e016076d1dbeff5e2b707b5cbf6.zip
paul-synchro-514dfee6f98b6e016076d1dbeff5e2b707b5cbf6.tar.gz
paul-synchro-514dfee6f98b6e016076d1dbeff5e2b707b5cbf6.tar.bz2
POC Campus Condorcet : code snapshot avant WF declare (inscription)
Diffstat (limited to 'django/sp_sso/invite/utils.py')
-rw-r--r--django/sp_sso/invite/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/sp_sso/invite/utils.py b/django/sp_sso/invite/utils.py
index dbe2ac5..5cc40fd 100644
--- a/django/sp_sso/invite/utils.py
+++ b/django/sp_sso/invite/utils.py
@@ -1,4 +1,5 @@
import json
+import logging
from urllib2 import build_opener, HTTPHandler, Request, urlopen
@@ -17,6 +18,8 @@ ADDITIONAL_PREFILLED_FIELDS = ['hote_etablissement', 'hote_unite']
PASSERELLE_PEOPLE_QUERY = 'http://dir-condorcet.dev.entrouvert.org/ldapquery/condorcet/run/6/'
+logger = logging.getLogger('django')
+
def get_invitaton_attributes_mapping():
return INVITATION_ATTRIBUTES_MAPPING.copy()
@@ -56,5 +59,6 @@ def get_affectations_from_eppn(eppn):
user['attributes'].get('supannEntiteAffectation', [''])[0])
raise Exception('Invalid user')
# fall back in except block
- except:
+ except Exception, e:
+ logger.error('%s' % e)
return ('', '')