##// END OF EJS Templates
util: use `iter(callable, sentinel)` instead of while True...
Augie Fackler -
r29730:4d23cd6e default
parent child Browse files
Show More
@@ -1012,10 +1012,7 b' def system(cmd, environ=None, cwd=None, '
1012 proc = subprocess.Popen(cmd, shell=True, close_fds=closefds,
1012 proc = subprocess.Popen(cmd, shell=True, close_fds=closefds,
1013 env=env, cwd=cwd, stdout=subprocess.PIPE,
1013 env=env, cwd=cwd, stdout=subprocess.PIPE,
1014 stderr=subprocess.STDOUT)
1014 stderr=subprocess.STDOUT)
1015 while True:
1015 for line in iter(proc.stdout.readline, ''):
1016 line = proc.stdout.readline()
1017 if not line:
1018 break
1019 out.write(line)
1016 out.write(line)
1020 proc.wait()
1017 proc.wait()
1021 rc = proc.returncode
1018 rc = proc.returncode
General Comments 0
You need to be logged in to leave comments. Login now