Fri, 30 Sep 2016 19:21:22 +0200
Fixed an interesting issue showing up when the code contains an invalid future statement.
--- a/DebugClients/Python2/DebugBase.py Wed Sep 28 20:04:44 2016 +0200 +++ b/DebugClients/Python2/DebugBase.py Fri Sep 30 19:21:22 2016 +0200 @@ -742,7 +742,18 @@ if exctype in [SyntaxError, IndentationError]: try: - message, (filename, lineno, charno, text) = excval + if type(excval) == tuple: + message, (filename, lineno, charno, text) = excval + else: + message = excval.msg + filename = excval.filename + lineno = excval.lineno + charno = excval.offset + if charno is None: + charno = 0 + + filename = os.path.abspath(filename) + realSyntaxError = os.path.exists(filename) except ValueError: message = "" filename = ""
--- a/DebugClients/Python3/DebugBase.py Wed Sep 28 20:04:44 2016 +0200 +++ b/DebugClients/Python3/DebugBase.py Fri Sep 30 19:21:22 2016 +0200 @@ -754,10 +754,13 @@ if exctype in [SyntaxError, IndentationError]: try: + printerr("1") message = str(excval) filename = excval.filename lineno = excval.lineno charno = excval.offset + if charno is None: + charno = 0 realSyntaxError = os.path.exists(filename) except (AttributeError, ValueError): message = ""
--- a/DebugClients/Python3/DebugClientBase.py Wed Sep 28 20:04:44 2016 +0200 +++ b/DebugClients/Python3/DebugClientBase.py Fri Sep 30 19:21:22 2016 +0200 @@ -352,6 +352,8 @@ filename = excval.filename lineno = excval.lineno charno = excval.offset + if charno is None: + charno = 0 except (AttributeError, ValueError): message = "" filename = ""