app/soc/views/helper/requests.py
changeset 1631 25ec972b5aa2
parent 1381 2cfce3831fc6
child 1670 4d9bd851a5f5
--- a/app/soc/views/helper/requests.py	Wed Mar 04 17:31:39 2009 +0000
+++ b/app/soc/views/helper/requests.py	Wed Mar 04 17:32:55 2009 +0000
@@ -51,7 +51,7 @@
   try:
     # GET parameter 'param_name' should be an integer value index
     value_idx = int(value_idx)
-  except:
+  except ValueError:
     # ignore bogus or missing parameter values, so return None (no message)
     return None
     
@@ -119,7 +119,7 @@
     # no HTTP referrer, so cannot possibly start with expected prefix
     return False
 
-  http_host = 'http://%s/%s' %(os.environ['HTTP_HOST'], url_name)
+  http_host = 'http://%s/%s' % (os.environ['HTTP_HOST'], url_name)
 
   if http_from.startswith(http_host):
     return True