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 ea902b8..c14d68b 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '1.2.5'
+version = '1.2.6'
 # 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.
index 2e153c8..5241f0d 100644 (file)
@@ -324,7 +324,11 @@ def whois():
     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(
@@ -343,7 +347,11 @@ def view():
     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])
@@ -364,6 +372,9 @@ def search():
     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'
@@ -780,6 +791,7 @@ def ls():
         target = g['stuff'].split()[0]
     except:
         printNicely(red('Omg some syntax is wrong.'))
+        return
     # Init cursor
     d = {'fl': 'followers', 'fr': 'friends'}
     next_cursor = -1
index 084daf3..32e1d62 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '1.2.5'
+version = '1.2.6'
 
 # Require
 install_requires = [