Given the script & .cfg file below, Pyre gets a KeyError which evades the
error-reporting system, leading to a traceback ending in:
File "/home/leif/dv/pythia/pyre/util/bool.py", line 21, in bool
return _stringToBool[response.lower()]
KeyError: 'maybe'
I found it difficult to figure out where the bogus value was coming from...
----------snip----------
#!/usr/bin/env python
from pyre.applications.Script import Script
class MyScript(Script):
name = "myscript"
class Inventory(Script.Inventory):
import pyre.inventory as pyre
answer = pyre.bool("answer")
def main(self, *args, **kwds):
self._info.log("the answer is %s" % self.inventory.answer)
if __name__ == "__main__":
app = MyScript()
app.run()
# end of file
----------snip----------
[myscript.journal.info]
myscript = maybe
|