From 158ec46e54c8d634e570b05fc13795e8036e2f95 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Wed, 30 May 2018 17:12:26 -0500 Subject: [PATCH] Better formatting of string #976 --- src/sos/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sos/utils.py b/src/sos/utils.py index 6bf7726f7..cdd558d02 100644 --- a/src/sos/utils.py +++ b/src/sos/utils.py @@ -1418,7 +1418,7 @@ def format_par(name, par): elif isinstance(val, Sequence) and not isinstance(val, str): return f'--{name} {" ".join(str(x) for x in val)} (as {val.__class__.__name__})' elif isinstance(val, str): - return f'--{name} {val!r}' + return f'--{name} {val if val.isalnum() else repr(val)}' else: return f'--{name} {val} (as {val.__class__.__name__})' except: