[Git][reproducible-builds/diffoscope][master] Call format_cmdline with a list to avoid "Command `s p a c e d` failed with..." error messages.

Chris Lamb gitlab at salsa.debian.org
Mon Nov 16 09:33:46 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
177b4144 by Chris Lamb at 2020-11-16T09:33:14+00:00
Call format_cmdline with a list to avoid "Command `s p a c e d` failed with..." error messages.

- - - - -


2 changed files:

- diffoscope/comparators/utils/file.py
- diffoscope/utils.py


Changes:

=====================================
diffoscope/comparators/utils/file.py
=====================================
@@ -527,7 +527,7 @@ class File(metaclass=abc.ABCMeta):
 
                 difference.add_comment(
                     "Command `{}` failed with exit code {}.{}".format(
-                        format_cmdline(e.cmd),
+                        format_cmdline([e.cmd]),
                         e.returncode,
                         suffix or " (No output)",
                     )


=====================================
diffoscope/utils.py
=====================================
@@ -23,6 +23,10 @@ import tempfile
 
 
 def format_cmdline(cmd, replace=(), truncate=None):
+    """
+    NB. Takes a list of strings, not a string.
+    """
+
     prefix = tempfile.gettempdir()
 
     def fn(x):



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/177b41446c10c47952d3a8b5f41572e67e29f703

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/177b41446c10c47952d3a8b5f41572e67e29f703
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20201116/32153dbe/attachment.htm>


More information about the rb-commits mailing list