Skip to content
Snippets Groups Projects
Commit 65ca70d2 authored by dkirov's avatar dkirov
Browse files

encode, only when result is unicode

parent 89fabab7
No related branches found
No related tags found
No related merge requests found
......@@ -253,7 +253,10 @@ class GajimRemote:
elif self.command == 'list_accounts':
if isinstance(res, list):
for account in res:
print account.encode(PREFERRED_ENCODING)
if isinstance(account, unicode):
print account.encode(PREFERRED_ENCODING)
else:
print account
elif self.command == 'account_info':
if res:
print self.print_info(0, res, True)
......@@ -265,7 +268,10 @@ class GajimRemote:
pref_keys.sort()
for pref_key in pref_keys:
result = '%s = %s' % (pref_key, res[pref_key])
print result.encode(PREFERRED_ENCODING)
if isinstance(result, unicode):
print result.encode(PREFERRED_ENCODING)
else:
print result
elif self.command == 'contact_info':
print self.print_info(0, res, True)
elif res:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment