Commits

Shivakumar GN  committed b6d8227

codereview: use subprocess.call() instead of os.spawnvp() for portability

Fixes issue 4121.

R=golang-dev, minux.ma, dave, r
CC=golang-dev
http://codereview.appspot.com/6555049

Committer: Shenghou Ma <minux.ma@gmail.com>

  • Participants
  • Parent commits 83b7e63

Comments (0)

Files changed (1)

File lib/codereview/codereview.py

 		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