Patchwork blackbox: don't unpack the list while passing into str.join()

login
register
mail settings
Submitter Pulkit Goyal
Date Jan. 19, 2018, 8:54 a.m.
Message ID <d8c9a1f2aa9c588434ff.1516352087@workspace>
Download mbox | patch
Permalink /patch/26948/
State Accepted
Headers show

Comments

Pulkit Goyal - Jan. 19, 2018, 8:54 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1516351218 -19800
#      Fri Jan 19 14:10:18 2018 +0530
# Node ID d8c9a1f2aa9c588434ffd4e28c4719d3c4ca5e51
# Parent  91a74c6c3e88634a9ac6bf9f4161c253fe1c4331
blackbox: don't unpack the list while passing into str.join()

The current state may result in error TypeError.
Caught using evolve-tests.
Yuya Nishihara - Jan. 19, 2018, 11:55 a.m.
On Fri, 19 Jan 2018 14:24:47 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1516351218 -19800
> #      Fri Jan 19 14:10:18 2018 +0530
> # Node ID d8c9a1f2aa9c588434ffd4e28c4719d3c4ca5e51
> # Parent  91a74c6c3e88634a9ac6bf9f4161c253fe1c4331
> blackbox: don't unpack the list while passing into str.join()

Queued, thanks.

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -133,7 +133,7 @@  def wrapui(ui):
         def debug(self, *msg, **opts):
             super(blackboxui, self).debug(*msg, **opts)
             if self.debugflag:
-                self.log('debug', '%s', ''.join(*msg))
+                self.log('debug', '%s', ''.join(msg))
 
         def log(self, event, *msg, **opts):
             global lastui