diff options
Diffstat (limited to 'libmproxy/script.py')
-rw-r--r-- | libmproxy/script.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmproxy/script.py b/libmproxy/script.py index 4676672b..a7b774e6 100644 --- a/libmproxy/script.py +++ b/libmproxy/script.py @@ -46,10 +46,12 @@ class Script: ns = {} try: execfile(path, ns, ns) - self.ns = ns - self.run("start", self.argv) except Exception, v: raise ScriptError(traceback.format_exc(v)) + self.ns = ns + r = self.run("start", self.argv) + if not r[0] and r[1]: + raise ScriptError(r[1][1]) def unload(self): return self.run("done") |