handle ctrl+c
authorOrakaro <nhatminh_179@hotmail.com>
Mon, 28 Jul 2014 00:27:39 +0000 (09:27 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Mon, 28 Jul 2014 00:27:39 +0000 (09:27 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index 1d3359c06ac2e9ef5f755c699da26fcd76b4fb95..5afa34a1be9127a787966e098b36b0517bed1533 100644 (file)
@@ -51,9 +51,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '0.5.4'
+version = '0.5.5'
 # The full version, including alpha/beta/rc tags.
-release = '0.5.4'
+release = '0.5.5'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index fbac32cb818bebd18cde231d440d74becb029f7c..c721189cccb7cb0322c1cee366d54eb3b8aef548 100644 (file)
@@ -143,6 +143,9 @@ def init(args):
     """
     Init function
     """
+    # Handle Ctrl C
+    ctrl_c_handler = lambda signum, frame: quit()
+    signal.signal(signal.SIGINT, ctrl_c_handler)
     # Get name
     t = Twitter(auth=authen())
     name = '@' + t.account.verify_credentials()['screen_name']
@@ -1471,6 +1474,7 @@ def quit():
     save_history()
     os.system('rm -rf rainbow.db')
     os.kill(g['stream_pid'], signal.SIGKILL)
+    printNicely(green('See you next time :)'))
     sys.exit()
 
 
index ae0049449fed54f1bd1c24f07b9d740f566ca7c6..0c15d7af59d2411b877e291d82861d096ace51e1 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 import os, os.path, sys
 
 # Bumped version
-version = '0.5.4'
+version = '0.5.5'
 
 # Require
 install_requires = [