Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1794

Show
Ignore:
Timestamp:
10/28/07 12:53:16
Author:
fumanchu
Message:

More-meaningful config syntax errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpconfig.py

    r1758 r1794  
    344344                    value = unrepr(value) 
    345345                except Exception, x: 
    346                     msg = ("Config error in section: %s, option: %s, value: %s" % 
    347                            (repr(section), repr(option), repr(value))) 
     346                    msg = ("Config error in section: %r, option: %r, " 
     347                           "value: %r. Config values must be valid Python." % 
     348                           (section, option, value)) 
    348349                    raise ValueError(msg, x.__class__.__name__, x.args) 
    349350                result[section][option] = value 
  • trunk/cherrypy/lib/__init__.py

    r1725 r1794  
    129129        return eval(s) 
    130130     
    131     p = compiler.parse("a=" + s) 
     131    p = compiler.parse("__tempvalue__ = " + s) 
    132132    obj = p.getChildren()[1].getChildren()[0].getChildren()[1] 
    133133     

Hosted by WebFaction

Log in as guest/cpguest to create tickets