[javascriptlint-commit] SF.net SVN: javascriptlint:[331] trunk/javascriptlint/jsl.py
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2013-10-03 19:39:11
|
Revision: 331
http://sourceforge.net/p/javascriptlint/code/331
Author: matthiasmiller
Date: 2013-10-03 19:39:07 +0000 (Thu, 03 Oct 2013)
Log Message:
-----------
Handle Ctrl+C.
Modified Paths:
--------------
trunk/javascriptlint/jsl.py
Modified: trunk/javascriptlint/jsl.py
===================================================================
--- trunk/javascriptlint/jsl.py 2013-10-03 19:16:44 UTC (rev 330)
+++ trunk/javascriptlint/jsl.py 2013-10-03 19:39:07 UTC (rev 331)
@@ -66,7 +66,7 @@
def _profile_disabled(func, *args, **kwargs):
func(*args, **kwargs)
-def main():
+def _main():
parser = OptionParser(usage="%prog [options] [files]")
add = parser.add_option
add("--conf", dest="conf", metavar="CONF",
@@ -154,6 +154,12 @@
sys.exit(1)
sys.exit(0)
+def main():
+ try:
+ _main()
+ except KeyboardInterrupt:
+ raise SystemExit(130)
+
if __name__ == '__main__':
main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|