[Git][reproducible-builds/diffoscope][master] 2 commits: If we don't know the HTML output name, don't emit an enigmatic "html output for" debug message.

Chris Lamb gitlab at salsa.debian.org
Fri Jan 17 17:26:32 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
b709d89b by Chris Lamb at 2020-01-17T16:18:42+00:00
If we don't know the HTML output name, don't emit an enigmatic "html output for" debug message.

- - - - -
5757c8b4 by Chris Lamb at 2020-01-17T17:22:54+00:00
Log a debug-level message if we cannot open a file as container due to a missing tool to assist in diagnosing issues. (Re: #86)

- - - - -


2 changed files:

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


Changes:

=====================================
diffoscope/comparators/utils/file.py
=====================================
@@ -243,7 +243,12 @@ class File(metaclass=abc.ABCMeta):
             )
             try:
                 self._as_container = self.__class__.CONTAINER_CLASS(self)
-            except RequiredToolNotFound:
+            except RequiredToolNotFound as exc:
+                logger.debug(
+                    "Cannot instantiate a %s; missing tool %s",
+                    type_name(self.__class__.CONTAINER_CLASS),
+                    exc.command,
+                )
                 return None
         logger.debug(
             "Returning a %s for %s",


=====================================
diffoscope/presenters/html/html.py
=====================================
@@ -718,7 +718,8 @@ class HTMLPresenter(Presenter):
             path = score[3]
             diff_path = output_diff_path(path)
             pagename = md5(diff_path)
-            logger.debug('html output for %s', diff_path)
+            if diff_path:
+                logger.debug('html output for %s', diff_path)
 
             ancestor = ancestors.pop(node, None)
             assert ancestor in path or (



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/compare/32930da914de17f2a0d689800dc35b38da9680da...5757c8b4090275a8f7df51c6797384c2e1b04fb9

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/compare/32930da914de17f2a0d689800dc35b38da9680da...5757c8b4090275a8f7df51c6797384c2e1b04fb9
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/20200117/b5a260f2/attachment.htm>


More information about the rb-commits mailing list