|
@@ -204,10 +204,8 @@ class RegistryCleaner():
|
204
|
204
|
try:
|
205
|
205
|
with BytesIO(
|
206
|
206
|
b"".join(_ for _ in self.docker.api.get_archive(self.container, path)[0])
|
207
|
|
- ) as buf:
|
208
|
|
- with tarfile.open(fileobj=buf) as tar:
|
209
|
|
- with tar.extractfile(os.path.basename(path)) as infile:
|
210
|
|
- data = infile.read()
|
|
207
|
+ ) as buf, tarfile.open(fileobj=buf) as tar, tar.extractfile(os.path.basename(path)) as infile:
|
|
208
|
+ data = infile.read()
|
211
|
209
|
except NotFound as err:
|
212
|
210
|
error(err)
|
213
|
211
|
return data
|