Fixed wk.std.color_string()
This commit is contained in:
parent
72787d5c24
commit
fdad48f613
1 changed files with 5 additions and 0 deletions
|
|
@ -743,6 +743,11 @@ def color_string(strings, colors, sep=' '):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Assuming single element passed, convert to string
|
# Assuming single element passed, convert to string
|
||||||
strings = (str(strings),)
|
strings = (str(strings),)
|
||||||
|
try:
|
||||||
|
iter(colors)
|
||||||
|
except TypeError:
|
||||||
|
# Assuming single element passed, convert to string
|
||||||
|
colors = (str(colors),)
|
||||||
|
|
||||||
# Build new string with color escapes added
|
# Build new string with color escapes added
|
||||||
for string, color in itertools.zip_longest(strings, colors):
|
for string, color in itertools.zip_longest(strings, colors):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue