VirtualMailManager/cli/__init__.py
branchv0.7.x
changeset 653 cf07e4468934
parent 643 df1e3b67882a
child 654 f2463a64e1d7
--- a/VirtualMailManager/cli/__init__.py	Sun Nov 25 14:37:09 2012 +0000
+++ b/VirtualMailManager/cli/__init__.py	Sun Nov 25 17:06:17 2012 +0000
@@ -31,7 +31,8 @@
     """Writes a line for each arg of *args*, encoded in the current
     ENCODING, to stdout.
     """
-    _std_write('\n'.join(a.encode(ENCODING, 'replace') for a in args) + '\n')
+    _std_write('\n'.join(arg.encode(ENCODING, 'replace').decode()
+               for arg in args) + '\n')
 
 
 def w_err(code, *args):
@@ -40,7 +41,8 @@
     This function optionally interrupts the program execution if *code*
     does not equal to 0. *code* will be used as the system exit status.
     """
-    _err_write('\n'.join(a.encode(ENCODING, 'replace') for a in args) + '\n')
+    _err_write('\n'.join(arg.encode(ENCODING, 'replace').decode()
+               for arg in args) + '\n')
     if code:
         os.sys.exit(code)