]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: use subprocess.call() instead of os.spawnvp() for portability
authorShivakumar GN <shivakumar.gn@gmail.com>
Wed, 26 Sep 2012 17:50:59 +0000 (01:50 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 26 Sep 2012 17:50:59 +0000 (01:50 +0800)
Fixes #4121.

R=golang-dev, minux.ma, dave, r
CC=golang-dev
https://golang.org/cl/6555049

lib/codereview/codereview.py

index 47317ad440e22007401acd048c8878f6ea6a2282..62553257bbb787f205cee6cf7194dc42e64046af 100644 (file)
@@ -1772,7 +1772,7 @@ def gofmt(ui, repo, *pats, **opts):
                cmd = ["gofmt", "-l"]
                if not opts["list"]:
                        cmd += ["-w"]
-               if os.spawnvp(os.P_WAIT, "gofmt", cmd + files) != 0:
+               if subprocess.call(cmd + files) != 0:
                        raise hg_util.Abort("gofmt did not exit cleanly")
        except hg_error.Abort, e:
                raise