Fix bug when start with public stream
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Mon, 22 Dec 2014 10:51:42 +0000 (19:51 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Mon, 22 Dec 2014 10:51:42 +0000 (19:51 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index 1ea37745280aaca8009a00ae1f4e5c91769d0fe4..ea902b826b148108df63de970d5043e5951baf8b 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.4'
+version = '1.2.5'
 # The full version, including alpha/beta/rc tags.
 # The full version, including alpha/beta/rc tags.
-release = '1.2.4'
+release = '1.2.5'
 
 # 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 a2c80e7711218bb9d1cf60079654841e0714fe24..2e153c8f74f7e854f4e536f0683a96ec61b2af54 100644 (file)
@@ -1965,7 +1965,7 @@ def stream(domain, args, name='Rainbow Stream'):
     # The Logo
     art_dict = {
         c['USER_DOMAIN']: name,
     # The Logo
     art_dict = {
         c['USER_DOMAIN']: name,
-        c['PUBLIC_DOMAIN']: args.track_keywords,
+        c['PUBLIC_DOMAIN']: args.track_keywords or 'Global',
         c['SITE_DOMAIN']: name,
     }
     if c['ASCII_ART']:
         c['SITE_DOMAIN']: name,
     }
     if c['ASCII_ART']:
@@ -2081,11 +2081,11 @@ def spawn_public_stream(args, keyword=None):
         if keyword[0] == '#':
             keyword = keyword[1:]
         args.track_keywords = keyword
         if keyword[0] == '#':
             keyword = keyword[1:]
         args.track_keywords = keyword
-    # Set the variable to tracked keyword
-    g['keyword'] = keyword
-    g['listname'] = ''
-    # Reset prefix
+        g['keyword'] = keyword
+    else:
+        g['keyword'] = 'Global'
     g['PREFIX'] = u2str(emojize(format_prefix(keyword=g['keyword'])))
     g['PREFIX'] = u2str(emojize(format_prefix(keyword=g['keyword'])))
+    g['listname'] = ''
     # Start new thread
     th = threading.Thread(
         target=stream,
     # Start new thread
     th = threading.Thread(
         target=stream,
@@ -2104,7 +2104,7 @@ def spawn_list_stream(args, stuff=None):
         owner, slug = check_slug(stuff)
     except:
         owner, slug = get_slug()
         owner, slug = check_slug(stuff)
     except:
         owner, slug = get_slug()
-    
+
     # Force python 2 not redraw readline buffer
     listname = '/'.join([owner, slug])
     # Set the listname variable
     # Force python 2 not redraw readline buffer
     listname = '/'.join([owner, slug])
     # Set the listname variable
@@ -2197,18 +2197,17 @@ def fly():
     target = args.stream.split()[0]
     if target == 'mine' :
         spawn_personal_stream(args)
     target = args.stream.split()[0]
     if target == 'mine' :
         spawn_personal_stream(args)
-    else :
+    else:
         try:
             stuff = args.stream.split()[1]
         try:
             stuff = args.stream.split()[1]
-            spawn_dict = {
-                'public': spawn_public_stream,
-                'list': spawn_list_stream,
-            }
-            spawn_dict.get(target)(args, stuff)
         except:
         except:
-            printNicely(red('Wrong -s/--stream argument given. Loading your personal stream.'))
-            spawn_personal_stream(args)
-    
+            stuff = None
+        spawn_dict = {
+            'public': spawn_public_stream,
+            'list': spawn_list_stream,
+        }
+        spawn_dict.get(target)(args, stuff)
+
     # Start listen process
     time.sleep(0.5)
     g['reset'] = True
     # Start listen process
     time.sleep(0.5)
     g['reset'] = True
index 4fc7dc54bdd2c458794fdfbb676eda8daf326862..084daf3a5ad7d01b7208a40611f325609012a257 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.4'
+version = '1.2.5'
 
 # Require
 install_requires = [
 
 # Require
 install_requires = [