Commits

Anonymous committed a97bbdd

replaced unrepr with smarter unreprWrapper, updated wiki link in CHERRYPYTEAM.txt

  • Participants
  • Parent commits 7df622c
  • Branches cherrypy

Comments (0)

Files changed (2)

         if section not in configMap:
             configMap[section] = {}
         for option in configParser.options(section):
-            value = _cputil.unrepr(configParser.get(section, option))
+            value = _cputil.unreprWrapper(configParser.get(section, option))
             configMap[section][option] = value
 
 def outputConfigMap():
 def unrepr(s):
       return Builder().build(getObj(s))
 
+def unreprWrapper(someString):
+      """unrepr raises an exception if the string is not a recognized type this function returns the
+         source string in that case
+     
+         '123abc' would cause unrepr to raise an exception
+      """
+      if not someString:
+            return someString
+      try:
+          return unrepr(someString)
+      except:
+          retur