mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Avoid fail when pprint an unicode character
This commit is contained in:
parent
4583d1afc8
commit
aa1c87c4d0
1 changed files with 3 additions and 1 deletions
|
@ -105,7 +105,9 @@ def pretty_print_dict(d, depth=0):
|
||||||
else:
|
else:
|
||||||
print((" ") * (depth+1) + "- " +str(value))
|
print((" ") * (depth+1) + "- " +str(value))
|
||||||
else:
|
else:
|
||||||
print((" ") * depth + "%s: %s" % (str(k), str(v)))
|
if not isinstance(v, basestring):
|
||||||
|
v = str(v)
|
||||||
|
print((" ") * depth + "%s: %s" % (str(k), v))
|
||||||
|
|
||||||
def is_true(arg):
|
def is_true(arg):
|
||||||
true_list = ['yes', 'Yes', 'true', 'True' ]
|
true_list = ['yes', 'Yes', 'true', 'True' ]
|
||||||
|
|
Loading…
Add table
Reference in a new issue