image-minimizer: Check for missing root directory
This commit is contained in:
parent
f8af828a80
commit
ab9068c2d0
@ -145,9 +145,13 @@ class ImageMinimizer:
|
||||
self.ts.run(runCallback, "erase")
|
||||
|
||||
def filter(self):
|
||||
if not os.path.isdir(self.prefix):
|
||||
raise FileNotFoundError(f"No such directory: '{self.prefix}")
|
||||
|
||||
with open(self.filename) as f:
|
||||
for line in f:
|
||||
self.parse_line(line.strip())
|
||||
|
||||
self.remove()
|
||||
self.remove_rpm()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user