minor fix
authorOrakaro <nhatminh_179@hotmail.com>
Sat, 14 Feb 2015 05:44:54 +0000 (14:44 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Sat, 14 Feb 2015 05:44:54 +0000 (14:44 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index ea902b826b148108df63de970d5043e5951baf8b..c14d68b91021882dc7377df118ddb8f495cae9e7 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
 # built documents.
 #
 # The short X.Y version.
-version = '1.2.5'
+version = '1.2.6'
 # The full version, including alpha/beta/rc tags.
 # The full version, including alpha/beta/rc tags.
-release = '1.2.5'
+release = '1.2.6'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 2e153c8f74f7e854f4e536f0683a96ec61b2af54..5241f0d70a05b030d6756e6026ca896db3803154 100644 (file)
@@ -324,7 +324,11 @@ def whois():
     Show profile of a specific user
     """
     t = Twitter(auth=authen())
     Show profile of a specific user
     """
     t = Twitter(auth=authen())
-    screen_name = g['stuff'].split()[0]
+    try:
+        screen_name = g['stuff'].split()[0]
+    except:
+        printNicely(red('Sorry I can\'t understand.'))
+        return
     if screen_name.startswith('@'):
         try:
             user = t.users.show(
     if screen_name.startswith('@'):
         try:
             user = t.users.show(
@@ -343,7 +347,11 @@ def view():
     Friend view
     """
     t = Twitter(auth=authen())
     Friend view
     """
     t = Twitter(auth=authen())
-    user = g['stuff'].split()[0]
+    try:
+        user = g['stuff'].split()[0]
+    except:
+        printNicely(red('Sorry I can\'t understand.'))
+        return
     if user[0] == '@':
         try:
             num = int(g['stuff'].split()[1])
     if user[0] == '@':
         try:
             num = int(g['stuff'].split()[1])
@@ -364,6 +372,9 @@ def search():
     t = Twitter(auth=authen())
     # Setup query
     query = g['stuff'].strip()
     t = Twitter(auth=authen())
     # Setup query
     query = g['stuff'].strip()
+    if not query:
+        printNicely(red('Sorry I can\'t understand.'))
+        return
     type = c['SEARCH_TYPE']
     if type not in ['mixed', 'recent', 'popular']:
         type = 'mixed'
     type = c['SEARCH_TYPE']
     if type not in ['mixed', 'recent', 'popular']:
         type = 'mixed'
@@ -780,6 +791,7 @@ def ls():
         target = g['stuff'].split()[0]
     except:
         printNicely(red('Omg some syntax is wrong.'))
         target = g['stuff'].split()[0]
     except:
         printNicely(red('Omg some syntax is wrong.'))
+        return
     # Init cursor
     d = {'fl': 'followers', 'fr': 'friends'}
     next_cursor = -1
     # Init cursor
     d = {'fl': 'followers', 'fr': 'friends'}
     next_cursor = -1
index 084daf3a5ad7d01b7208a40611f325609012a257..32e1d62b4da44375be8d36f91bea0affddd1b59d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
 import os.path
 
 # Bumped version
-version = '1.2.5'
+version = '1.2.6'
 
 # Require
 install_requires = [
 
 # Require
 install_requires = [