浏览代码

Try to fix encoding issue

Ask Solem 11 年之前
父节点
当前提交
d0542179cc
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      celery/apps/worker.py

+ 4 - 4
celery/apps/worker.py

@@ -186,10 +186,10 @@ class Worker(WorkController):
 
         # Dump configuration to screen so we have some basic information
         # for when users sends bug reports.
-        sys.__stdout__.write(
-            str(self.colored.cyan(' \n', self.startup_info())) +
-            str(self.colored.reset(self.extra_info() or '')) + '\n'
-        )
+        print(''.join([
+            string(self.colored.cyan(' \n', self.startup_info())),
+            string(self.colored.reset(self.extra_info() or '')),
+        ]), file=sys.__stdout__)
         self.set_process_status('-active-')
         self.install_platform_tweaks(self)