Use iterdir instead of glob

This commit is contained in:
Mikhail Gordeev 2019-09-07 01:10:16 +03:00
parent 0a1dd9ecec
commit dc79d5cf6c

View File

@ -438,7 +438,7 @@ Dir::Etc::preferencesparts "/var/empty";
def clear_imager_dir(self): def clear_imager_dir(self):
for branch in self.branches: for branch in self.branches:
directory = self.images_dir / branch directory = self.images_dir / branch
for path in directory.glob('*'): for path in directory.iterdir():
os.unlink(path) os.unlink(path)
def remove_old_tarballs(self): def remove_old_tarballs(self):