summaryrefslogtreecommitdiff
path: root/pygmentize
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2008-01-11 17:56:20 +0100
committergbrandl <devnull@localhost>2008-01-11 17:56:20 +0100
commit7237b2ca3f1512032d40d7a73676037750d086ec (patch)
tree76df4da0a04d5ede829dfb3aa8f4e8a5f2865edf /pygmentize
parent586152b08e1b7a7cb1af80a4e9f2188314f6a61c (diff)
downloadpygments-7237b2ca3f1512032d40d7a73676037750d086ec.tar.gz
Handle a few more errors gracefully.
Diffstat (limited to 'pygmentize')
-rwxr-xr-xpygmentize5
1 files changed, 4 insertions, 1 deletions
diff --git a/pygmentize b/pygmentize
index 0b49e3df..e2379199 100755
--- a/pygmentize
+++ b/pygmentize
@@ -1,4 +1,7 @@
#!/usr/bin/env python
import sys, pygments.cmdline
-sys.exit(pygments.cmdline.main(sys.argv))
+try:
+ sys.exit(pygments.cmdline.main(sys.argv))
+except KeyboardInterrupt:
+ sys.exit(1)