From: Michael Tremer Date: Mon, 17 Oct 2022 17:27:37 +0000 (+0000) Subject: backend: Fix opening package files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08095787dc936d09e3f0af321437f27f9e96e608;p=pbs.git backend: Fix opening package files Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/__init__.py b/src/buildservice/__init__.py index 2bda0608..7473863e 100644 --- a/src/buildservice/__init__.py +++ b/src/buildservice/__init__.py @@ -283,11 +283,11 @@ class Backend(object): return await asyncio.to_thread(self._open, path) def _open(self, path): - # Create a dummy Pakfire instance - p = pakfire.Pakfire(offline=True) + log.debug("Opening %s..." % path) # Open the archive - return p.open(path) + with self.pakfire() as p: + return p.open(path) @property def ssl_context(self):