term
authorVu Nhat Minh <vunhat_minh@dwango.co.jp>
Thu, 3 Jul 2014 08:36:57 +0000 (17:36 +0900)
committerVu Nhat Minh <vunhat_minh@dwango.co.jp>
Thu, 3 Jul 2014 08:36:57 +0000 (17:36 +0900)
rainbowstream/draw.py

index d25a3c9..a6f3e56 100644 (file)
@@ -25,7 +25,7 @@ def init_cycle():
     """
     colors_shuffle = [globals()[i.encode('utf8')]
         if not i.startswith('term_')
-        else term_color(int(i[4:]))
+        else term_color(int(i[5:]))
         for i in c['CYCLE_COLOR']]
     return itertools.cycle(colors_shuffle)
 g['cyc'] = init_cycle()
@@ -109,8 +109,8 @@ def color_func(func_name):
     Call color function base on name
     """
     pure = func_name.encode('utf8')
-    if pure.startswith('term_') and pure[4:].isdigit():
-        return term_color(int(pure[4:]))
+    if pure.startswith('term_') and pure[5:].isdigit():
+        return term_color(int(pure[5:]))
     return globals()[pure]