summaryrefslogtreecommitdiff
path: root/pygments/cmdline.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-18 13:29:19 +0100
committerGeorg Brandl <georg@python.org>2014-01-18 13:29:19 +0100
commitb6b690fb833e7031a3008509c1107f7567c065f3 (patch)
treed7b80f8e63919a94dfe7dc5bd8106d98ee4b5251 /pygments/cmdline.py
parenta9169c157a05c82a1b8a7ffb92e7f159fb4ca0f8 (diff)
downloadpygments-b6b690fb833e7031a3008509c1107f7567c065f3.tar.gz
manual prettifying and small fixes after futurize run
Diffstat (limited to 'pygments/cmdline.py')
-rw-r--r--pygments/cmdline.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/cmdline.py b/pygments/cmdline.py
index 5843ad63..af8d48ea 100644
--- a/pygments/cmdline.py
+++ b/pygments/cmdline.py
@@ -8,7 +8,9 @@
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+
from __future__ import print_function
+
import sys
import getopt
from textwrap import dedent
@@ -203,7 +205,7 @@ def main(args=sys.argv):
try:
popts, args = getopt.getopt(args[1:], "l:f:F:o:O:P:LS:a:N:hVHg")
- except getopt.GetoptError as err:
+ except getopt.GetoptError:
print(usage, file=sys.stderr)
return 2
opts = {}
@@ -427,7 +429,7 @@ def main(args=sys.argv):
for fname, fopts in F_opts:
lexer.add_filter(fname, **fopts)
highlight(code, lexer, fmter, outfile)
- except Exception as err:
+ except Exception:
import traceback
info = traceback.format_exception(*sys.exc_info())
msg = info[-1].strip()