Skip to content
Snippets Groups Projects
Commit c082b52f authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

If the debian.deb822 module raises any exception on import, re-raise it as an...

If the debian.deb822 module raises any exception on import, re-raise it as an ImportError. This should fix diffoscope on some Fedora systems. (Closes: #300)
parent 0c124437
No related branches found
No related tags found
No related merge requests found
Pipeline #339732 passed
......@@ -2,7 +2,7 @@
# diffoscope: in-depth comparison of files, archives, and directories
#
# Copyright © 2014-2015 Jérémy Bobbio <lunar@debian.org>
# Copyright © 2015-2021 Chris Lamb <lamby@debian.org>
# Copyright © 2015-2022 Chris Lamb <lamby@debian.org>
#
# diffoscope is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -21,7 +21,13 @@ import re
import os.path
import logging
from debian.deb822 import Dsc, Deb822
try:
from debian.deb822 import Dsc, Deb822
except:
# Import can fail due to apt_pkg.Error (or similar) tracebacks, but let us
# re-raise them as ImportErrors so that the Comparator module class
# handling just works. (See reproducible-builds/diffoscope#300)
raise ImportError
from diffoscope.changes import Changes
from diffoscope.changes import ChangesFileException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment