소스 검색

[desktop] Replace Python 2.7 subprocess.check_output with a 2.6-safe code

Erick Tryzelaar 10 년 전
부모
커밋
ccc9776009
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      desktop/core/src/desktop/conf.py

+ 2 - 1
desktop/core/src/desktop/conf.py

@@ -53,7 +53,8 @@ def coerce_port(port):
 
 
 def coerce_password_from_script(script):
-  password = subprocess.check_output(script, shell=True)
+  p = subprocess.Popen(script, shell=True, stdout=subprocess.PIPE)
+  password = p.communicate()[0]
 
   # whitespace may be significant in the password, but most files have a
   # trailing newline.