Patchwork [3,of,8,STABLE] revsetbenchmark: fix error raising

login
register
mail settings
Submitter Pierre-Yves David
Date April 29, 2014, 12:48 a.m.
Message ID <94efb32efe7a266c16f0.1398732510@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4447/
State Accepted
Commit c04e5e937139f13772e6597c1c070b0feafcc639
Headers show

Comments

Pierre-Yves David - April 29, 2014, 12:48 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1398458691 25200
#      Fri Apr 25 13:44:51 2014 -0700
# Branch stable
# Node ID 94efb32efe7a266c16f0a89b190e10a1931dacf5
# Parent  3a33cd29d255c49d03a3ec9d63b48b6622941c5b
revsetbenchmark: fix error raising

We want to display the commands, not all arguments of the function. (The old
code actually crash, failing to joining a list of lists.)

Patch

diff --git a/contrib/revsetbenchmarks.py b/contrib/revsetbenchmarks.py
--- a/contrib/revsetbenchmarks.py
+++ b/contrib/revsetbenchmarks.py
@@ -20,11 +20,11 @@  def check_output(*args, **kwargs):
     kwargs.setdefault('stderr', PIPE)
     kwargs.setdefault('stdout', PIPE)
     proc = Popen(*args, **kwargs)
     output, error = proc.communicate()
     if proc.returncode != 0:
-        raise CalledProcessError(proc.returncode, ' '.join(args))
+        raise CalledProcessError(proc.returncode, ' '.join(args[0]))
     return output
 
 def update(rev):
     """update the repo to a revision"""
     try: