aboutsummaryrefslogtreecommitdiffstats
path: root/scanner/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'scanner/main.py')
-rwxr-xr-xscanner/main.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scanner/main.py b/scanner/main.py
index 6134f6f..b15d593 100755
--- a/scanner/main.py
+++ b/scanner/main.py
@@ -1,13 +1,18 @@
#!/usr/bin/env python
from TreeWalker import TreeWalker
-from sys import argv
+from sys import argv, exit
+from CachePath import message
def main():
if len(argv) != 3:
print "usage: %s ALBUM_PATH CACHE_PATH" % argv[0]
return
- TreeWalker(argv[1], argv[2])
+ try:
+ TreeWalker(argv[1], argv[2])
+ except KeyboardInterrupt:
+ message("keyboard", "CTRL+C pressed, quitting.")
+ exit(-97)
if __name__ == "__main__":
main() \ No newline at end of file