Mercurial > hg
comparison mercurial/util.py @ 8339:f55869abb5c3
util: remove ignored mode argument in popen[23]
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 09 May 2009 17:32:57 +0200 |
parents | aa25be1c2889 |
children | fce065538bcf |
comparison
equal
deleted
inserted
replaced
8338:44e9771746b9 | 8339:f55869abb5c3 |
---|---|
36 _fastsha1 = sha1 = _sha1 | 36 _fastsha1 = sha1 = _sha1 |
37 return _sha1(s) | 37 return _sha1(s) |
38 | 38 |
39 import subprocess | 39 import subprocess |
40 closefds = os.name == 'posix' | 40 closefds = os.name == 'posix' |
41 def popen2(cmd, mode='t', bufsize=-1): | 41 def popen2(cmd, bufsize=-1): |
42 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, | 42 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, |
43 close_fds=closefds, | 43 close_fds=closefds, |
44 stdin=subprocess.PIPE, stdout=subprocess.PIPE) | 44 stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
45 return p.stdin, p.stdout | 45 return p.stdin, p.stdout |
46 def popen3(cmd, mode='t', bufsize=-1): | 46 def popen3(cmd, bufsize=-1): |
47 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, | 47 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, |
48 close_fds=closefds, | 48 close_fds=closefds, |
49 stdin=subprocess.PIPE, stdout=subprocess.PIPE, | 49 stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
50 stderr=subprocess.PIPE) | 50 stderr=subprocess.PIPE) |
51 return p.stdin, p.stdout, p.stderr | 51 return p.stdin, p.stdout, p.stderr |