[xiph-commits] r15319 - websites/validator.xspf.org

sping at svn.xiph.org sping at svn.xiph.org
Thu Sep 18 19:00:54 PDT 2008


Author: sping
Date: 2008-09-18 19:00:54 -0700 (Thu, 18 Sep 2008)
New Revision: 15319

Modified:
   websites/validator.xspf.org/check.py
Log:
Fix entity lookup

Modified: websites/validator.xspf.org/check.py
===================================================================
--- websites/validator.xspf.org/check.py	2008-09-19 00:23:16 UTC (rev 15318)
+++ websites/validator.xspf.org/check.py	2008-09-19 02:00:54 UTC (rev 15319)
@@ -1201,7 +1201,14 @@
             valueLen += start - lastend
 
             entityRefName = value[start + 1: end - 1]
-            entityInfo = entityNameToValueLen[entityRefName]
+            try:
+                entityInfo = entityNameToValueLen[entityRefName]
+            except KeyError:
+                entityInfo = {
+                    'valueLen' : 1,
+                    'lookupSum' : 0,
+                    'lookupDepth' : 0,
+                }
             valueLen += entityInfo['valueLen']
             lookupSum += 1 + entityInfo['lookupSum']
             lookupDepth = max(1 + entityInfo['lookupDepth'], lookupDepth)



More information about the commits mailing list