[diffoscope] 01/01: rdata: don't break if the .rdx isn't present

Ximin Luo infinity0 at debian.org
Thu Apr 20 21:35:59 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch experimental
in repository diffoscope.

commit d3a94293a4d56fbb34e37d333b53c5d3324fa4e5
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Apr 20 21:35:45 2017 +0200

    rdata: don't break if the .rdx isn't present
---
 diffoscope/comparators/rdata.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/diffoscope/comparators/rdata.py b/diffoscope/comparators/rdata.py
index 2b66189..be310e4 100644
--- a/diffoscope/comparators/rdata.py
+++ b/diffoscope/comparators/rdata.py
@@ -53,7 +53,11 @@ def ensure_archive_rdx(f):
         assert bname.endswith(".rdb")
         rdx_name = f.name[:-4] + ".rdx"
         rdx_bname = os.path.basename(rdx_name)
-        rdx_path = f.container.get_member(rdx_name).path
+        try:
+            rdx_path = f.container.get_member(rdx_name).path
+        except KeyError:
+            return f.path
+            # R will fail, diffoscope will report the error and continue
         shutil.copy(f.path, f.path + ".rdb")
         shutil.copy(rdx_path, f.path + ".rdx")
         return f.path + ".rdb"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list