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 d25a3c9e26123340eae79e9ef28ce0994808ed41..a6f3e565a6c3f8cad63d3067a54629ceab8aa3d4 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]