Update index.rst
[rainbowstream.git] / rainbowstream / rainbow.py
index 60773477fb24f3d0ecb993af76a52fd5a3bd395d..14149d9e1ec3c8c586f74f9e5e618dbdcbd304ae 100644 (file)
@@ -157,7 +157,6 @@ def init(args):
     files = os.listdir(os.path.dirname(__file__) + '/colorset')
     themes = [f.split('.')[0] for f in files if f.split('.')[-1] == 'json']
     g['themes'] = themes
-    g['prev_theme'] = c['THEME']
     # Semaphore init
     c['lock'] = False
     c['pause'] = False
@@ -508,7 +507,7 @@ def urlopen():
     try:
         if not g['stuff'].isdigit():
             return
-        tid = c['tweet_dict'][g['stuff']]
+        tid = c['tweet_dict'][int(g['stuff'])]
         tweet = t.statuses.show(id=tid)
         link_ary = [
             u for u in tweet['text'].split() if u.startswith('http://')]
@@ -1173,8 +1172,7 @@ def theme():
                 c['DECORATED_NAME'])(
                 '[' + x + ']: ')
             printNicely(green('Theme changed.'))
-        except Exception as e:
-            print e
+        except:
             printNicely(red('No such theme exists.'))
 
 
@@ -1607,7 +1605,6 @@ def listen():
     read_history()
     reset()
     while True:
-        # Prompt redraw is needed when user is typing
         # raw_input
         if g['prefix']:
             line = raw_input(g['decorated_name'](c['PREFIX']))
@@ -1618,7 +1615,6 @@ def listen():
         except:
             cmd = ''
         g['cmd'] = cmd
-        # Prompt redraw not need when raw_input done
         try:
             # Lock the semaphore
             c['lock'] = True