do some logging
authorSebastian Annies <sebastian.annies@googlemail.com>
Wed, 26 Oct 2011 00:31:51 +0000 (02:31 +0200)
committerSebastian Annies <sebastian.annies@googlemail.com>
Wed, 26 Oct 2011 00:31:51 +0000 (02:31 +0200)
cas_provider/views.py
setup.py

index 5b66681..953847b 100644 (file)
@@ -1,3 +1,4 @@
+import logging
 from lxml import etree
 from urllib import urlencode
 import urllib2
@@ -29,6 +30,8 @@ ERROR_MESSAGES = (
     )
 
 
+logger = logging.getLogger(__name__)
+
 def login(request, template_name='cas/login.html',\
           success_redirect=settings.LOGIN_REDIRECT_URL,
           warn_template_name='cas/warn.html',
@@ -200,8 +203,10 @@ def generate_proxy_granting_ticket(pgt_url, ticket):
         response = urllib2.urlopen(urlparse.urlunsplit(uri))
     except urllib2.HTTPError, e:
         if not e.code in proxy_callback_good_status:
+            logger.debug('Checking Proxy Callback URL {} returned {}. Not issuing PGT.'.format(uri, e.code))
             return
     except urllib2.URLError, e:
+        logger.debug('Checking Proxy Callback URL {} raised URLError. Not issuing PGT.'.format(uri))
         return
 
     pgt.save()
index a88cbef..fe96615 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ def read(fname):
 
 setup(
     name='django-cas-provider',
-    version='0.3.1',
+    version='0.3.2',
     description='A "provider" for the Central Authentication Service (http://jasig.org/cas)',
     author='(Chris Williams), Sebastian Annies',
     author_email='(chris@nitron.org), sebastian.annies@googlemail.com',