[chrome-gnome-shell/feature/python3] python3: read bytes from stdin instead of text



commit 47e4f5f1dfdb11c6569275277ab78cf36f0759a1
Author: Yuri Konotopov <ykonotopov gmail com>
Date:   Sun Mar 27 10:56:12 2016 +0300

    python3: read bytes from stdin instead of text

 connector/gs-chrome-connector.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/connector/gs-chrome-connector.py b/connector/gs-chrome-connector.py
index 60c76ed..6fc6a21 100755
--- a/connector/gs-chrome-connector.py
+++ b/connector/gs-chrome-connector.py
@@ -87,7 +87,7 @@ def read_thread_func(proxy, mainLoop):
 
     while mainLoop.is_running():
         # Read the message length (first 4 bytes).
-        text_length_bytes = sys.stdin.read(4)
+        text_length_bytes = sys.stdin.buffer.read(4)
 
         if len(text_length_bytes) == 0:
             mainLoop.quit()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]