Explorar o código

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

Erick Tryzelaar %!s(int64=10) %!d(string=hai) anos
pai
achega
ccc9776009
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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.