X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Fcompyle4vim.py;h=88a5705f9b87f1817483c87ef71daf8d28c2b1cb;hb=7c8abf339f6f103cf25d5f6c0d80bc6ae8ed75b6;hp=8b5c78b7546cc2c73eee7fb38c95584e16e66d18;hpb=f46bd4d41cc7f243bc8a321effee5200aa69e709;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