Commits

Fredrik Håård committed a1fa539

Make error message match actual command

  • Participants
  • Parent commits afc306c

Comments (0)

Files changed (1)

File hgapi/hgapi.py

 
             Raise on error.
         """
-        proc = Popen(["hg", "--cwd", path, "--encoding", "UTF-8"] + list(args),
+        cmd = ["hg", "--cwd", path, "--encoding", "UTF-8"] + list(args)
+        proc = Popen(cmd,
                      stdout=PIPE, stderr=PIPE, env=env)
 
         out, err = [x.decode("utf-8") for x in proc.communicate()]
 
         if proc.returncode:
-            cmd = (" ".join(["hg", "--cwd", path] + list(args)))
+            cmd = " ".join(cmd)
             raise HgException("Error running %s:\n\" + "
                               "tErr: %s\n\t"
                               "Out: %s\n\t"