Fixed wk.std.color_string()

This commit is contained in:
2Shirt 2020-01-04 21:00:36 -07:00
parent 72787d5c24
commit fdad48f613
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -743,6 +743,11 @@ def color_string(strings, colors, sep=' '):
except TypeError:
# Assuming single element passed, convert to string
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
for string, color in itertools.zip_longest(strings, colors):