Skip to content
Commits on Source (2)
......@@ -22,6 +22,7 @@ import logging
import os.path
from diffoscope.difference import Difference
from diffoscope.exc import ContainerExtractionError
from .utils.file import File
from .utils.archive import Archive
......@@ -71,8 +72,10 @@ class FsImageContainer(Archive):
def extract(self, member_name, dest_dir):
dest_path = os.path.join(dest_dir, member_name)
logger.debug('filesystem image extracting to %s', dest_path)
self.g.tar_out('/', dest_path)
try:
self.g.tar_out('/', dest_path)
except AttributeError as exc:
raise ContainerExtractionError(member_name, exc)
return dest_path
......
......@@ -19,7 +19,6 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
import subprocess
from diffoscope.path import set_path
from diffoscope.locale import set_locale
......@@ -48,17 +47,3 @@ def reload_comparators():
@pytest.fixture(autouse=True)
def reset_progress():
ProgressManager().reset()
def pytest_report_header(config):
if config.option.verbose == 0:
return
try:
return ["", "Installed Debian packages:", "", subprocess.check_output((
'dpkg-query',
'-W',
'-f', '${db:Status-Abbrev}\t${binary:Package} (${Version})\n'
)).decode('utf-8')]
except:
pass