소스 검색

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)