Permalink
Browse files

exception - permissions

  • Loading branch information...
1 parent b0fddc2 commit 051a3b88c3ed069a9b3c38a9276f412ec868f78d @LukasHurych committed Jan 7, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 watcher.py
View
@@ -1,5 +1,7 @@
import os, sys, re, time, io
+import argparse
+
from pygments import highlight
from pygments.lexers import SqlLexer
from pygments.formatters import Terminal256Formatter
@@ -110,3 +112,5 @@ def highlight_line(self, text):
except IOError:
sys.stderr.write("Can't read file '%s' (Do you have sufficient privileges?)\n" % filename)
sys.exit(1)
+ except KeyboardInterrupt:
+ sys.exit()

0 comments on commit 051a3b8

Please sign in to comment.