[or-cvs] r14525: Catch an error with replace throwing an exception when no da (check/trunk/cgi-bin)

ioerror at seul.org ioerror at seul.org
Thu May 1 06:51:02 UTC 2008


Author: ioerror
Date: 2008-05-01 02:51:02 -0400 (Thu, 01 May 2008)
New Revision: 14525

Modified:
   check/trunk/cgi-bin/index.py
Log:
Catch an error with replace throwing an exception when no data is there to be parsed.


Modified: check/trunk/cgi-bin/index.py
===================================================================
--- check/trunk/cgi-bin/index.py	2008-05-01 06:41:44 UTC (rev 14524)
+++ check/trunk/cgi-bin/index.py	2008-05-01 06:51:02 UTC (rev 14525)
@@ -91,7 +91,8 @@
 
     # This is to deal with Mozilla and Debian having different ideas about
     # what it means to be a locale
-    user_supplied_lang = user_supplied_lang.replace("-", "_")
+    if user_supplied_lang:
+        user_supplied_lang = user_supplied_lang.replace("-", "_")
 
     for item in locales:
         if item == user_supplied_lang:



More information about the tor-commits mailing list