X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Fcompyle4vim.py;fp=bin%2Fcompyle4vim.py;h=88a5705f9b87f1817483c87ef71daf8d28c2b1cb;hb=b1d0980bb6e404ca147bd3484320e1d32e2f9857;hp=8b5c78b7546cc2c73eee7fb38c95584e16e66d18;hpb=46454f2d385f4083f305c456a173866d0f557edf;p=dotfiles.git diff --git a/bin/compyle4vim.py b/bin/compyle4vim.py index 8b5c78b..88a5705 100755 --- a/bin/compyle4vim.py +++ b/bin/compyle4vim.py @@ -17,12 +17,15 @@ try: template.compile() else: compile(codestring, filename, "exec") -except SyntaxError, detail: - pass +except SyntaxError as detail: + msg = str(detail) + filename = detail.filename + lineno = detail.lineno + offset = detail.offset + lineno = detail.lineno else: sys.exit() -msg, (_fname, lineno, offset, line) = detail if offset is None: offset = 1 sys.stderr.write(""" File "%s", line %d, column %d