From 6bfee9504322256c5deceab51f063374d03468de Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 13 Dec 2019 16:38:24 -0700 Subject: [PATCH] Support coloring pathlib.Path objects --- scripts/wk/std.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index ac197b67..cd5e9dc1 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -738,9 +738,9 @@ def color_string(strings, colors, sep=' '): msg = [] # Convert to tuples if necessary - if isinstance(strings, str): + if isinstance(strings, (str, pathlib.Path)): strings = (strings,) - if isinstance(colors, str): + if isinstance(colors, (str, pathlib.Path)): colors = (colors,) # Build new string with color escapes added