From 3e06aa8f518e076dfddd2f68e7ee2a4dea6e1810 Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Mon, 22 Dec 2014 19:51:42 +0900 Subject: [PATCH] Fix bug when start with public stream --- docs/conf.py | 4 ++-- rainbowstream/rainbow.py | 29 ++++++++++++++--------------- setup.py | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1ea3774..ea902b8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh' # built documents. # # The short X.Y version. -version = '1.2.4' +version = '1.2.5' # 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. diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index a2c80e7..2e153c8 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -1965,7 +1965,7 @@ def stream(domain, args, name='Rainbow Stream'): # 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']: @@ -2081,11 +2081,11 @@ def spawn_public_stream(args, keyword=None): 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['listname'] = '' # 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() - + # 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) - else : + else: try: stuff = args.stream.split()[1] - spawn_dict = { - 'public': spawn_public_stream, - 'list': spawn_list_stream, - } - spawn_dict.get(target)(args, stuff) 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 diff --git a/setup.py b/setup.py index 4fc7dc5..084daf3 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os import os.path # Bumped version -version = '1.2.4' +version = '1.2.5' # Require install_requires = [ -- 2.25.1