diff options
| author | Lieuwe <lieuwemo@gmail.com> | 2011-02-26 20:32:53 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-03-02 20:54:50 (GMT) |
| commit | bda76e2e4ef7273d07a2809d10029d862459aae3 (patch) | |
| tree | 514ee46bc0a414f9de7abb59ff87b47b8f4b783d | |
| parent | 7f159be25a0c5eb7b965db147d883bc88941b4f0 (diff) | |
| download | powder-bda76e2e4ef7273d07a2809d10029d862459aae3.zip powder-bda76e2e4ef7273d07a2809d10029d862459aae3.tar.gz | |
try eval first
| -rw-r--r-- | build/tpt_console.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build/tpt_console.py b/build/tpt_console.py index 9e5e824..655c108 100644 --- a/build/tpt_console.py +++ b/build/tpt_console.py @@ -95,9 +95,12 @@ def handle(txt): def _handle(txt): #print "handling '%s'"%txt try: - exec txt - except Exception as ex: - error(ex) + sys.stdout.write(repr(eval(tmp))) + except: + try: + exec txt + except Exception as ex: + error(ex)
\ No newline at end of file |
