comparison hgext/logtoprocess.py @ 39841:f1d6021453c2

py3: remove a couple of superfluous calls to pycompat.rapply() These places can only be strings.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 25 Sep 2018 23:25:36 -0400
parents c31ce080eb75
children 566cc633e637
comparison
equal deleted inserted replaced
39840:91d63fd58e7d 39841:f1d6021453c2
64 64
65 def runshellcommand(script, env): 65 def runshellcommand(script, env):
66 # we can't use close_fds *and* redirect stdin. I'm not sure that we 66 # we can't use close_fds *and* redirect stdin. I'm not sure that we
67 # need to because the detached process has no console connection. 67 # need to because the detached process has no console connection.
68 subprocess.Popen( 68 subprocess.Popen(
69 pycompat.rapply(procutil.tonativestr, script), 69 procutil.tonativestr(script),
70 shell=True, env=procutil.tonativeenv(env), close_fds=True, 70 shell=True, env=procutil.tonativeenv(env), close_fds=True,
71 creationflags=_creationflags) 71 creationflags=_creationflags)
72 else: 72 else:
73 def runshellcommand(script, env): 73 def runshellcommand(script, env):
74 # double-fork to completely detach from the parent process 74 # double-fork to completely detach from the parent process
85 newsession = {'start_new_session': True} 85 newsession = {'start_new_session': True}
86 try: 86 try:
87 # connect stdin to devnull to make sure the subprocess can't 87 # connect stdin to devnull to make sure the subprocess can't
88 # muck up that stream for mercurial. 88 # muck up that stream for mercurial.
89 subprocess.Popen( 89 subprocess.Popen(
90 pycompat.rapply(procutil.tonativestr, script), 90 procutil.tonativestr(script),
91 shell=True, stdin=open(os.devnull, 'r'), 91 shell=True, stdin=open(os.devnull, 'r'),
92 env=procutil.tonativeenv(env), 92 env=procutil.tonativeenv(env),
93 close_fds=True, **newsession) 93 close_fds=True, **newsession)
94 finally: 94 finally:
95 # mission accomplished, this child needs to exit and not 95 # mission accomplished, this child needs to exit and not