VirtualMailManager/cli/__init__.py
branchv0.7.x
changeset 654 f2463a64e1d7
parent 653 cf07e4468934
child 663 de435d1aa1c0
--- a/VirtualMailManager/cli/__init__.py	Sun Nov 25 17:06:17 2012 +0000
+++ b/VirtualMailManager/cli/__init__.py	Mon Nov 26 19:04:38 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(arg.encode(ENCODING, 'replace').decode()
+    _std_write('\n'.join(arg.encode(ENCODING, 'replace').decode(ENCODING,
+                                                                'replace')
                for arg in args) + '\n')
 
 
@@ -41,7 +42,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(arg.encode(ENCODING, 'replace').decode()
+    _err_write('\n'.join(arg.encode(ENCODING, 'replace').decode(ENCODING,
+                                                                'replace')
                for arg in args) + '\n')
     if code:
         os.sys.exit(code)