diff --git a/cli/util.py b/cli/util.py index a4504e6..e207c46 100644 --- a/cli/util.py +++ b/cli/util.py @@ -53,6 +53,11 @@ def maptup(fun, lst): def translate(value, translations): return translations.get(value, value) +def str_or_empty(value): + if value: + return str(value) + return '' + def p(s): encoded = s if isinstance(s, unicode):