From aa3441ae45b348aa2e1b422d1c5a69b49e909a95 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 24 Nov 2012 01:14:06 +0100 Subject: [PATCH] js2c: raise proper Exception, not a string Fixes the following error message: TypeError: exceptions must be old-style classes or derived from BaseException, not str Fixes #4303. --- tools/js2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/js2c.py b/tools/js2c.py index 7c83c67ba66..772a0f5f695 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -206,7 +206,7 @@ def ReadMacros(lines): fun = eval("lambda " + ",".join(args) + ': ' + body) macros[name] = PythonMacro(args, fun) else: - raise ("Illegal line: " + line) + raise Exception("Illegal line: " + line) return (constants, macros)