Handle exclude patterns

This commit is contained in:
Einar Forselv 2019-04-17 02:44:48 +02:00
parent ae2b1c3fc2
commit 9397a87655
1 changed files with 6 additions and 1 deletions

View File

@ -68,7 +68,12 @@ class Container:
filtered.append(mount) filtered.append(mount)
elif self.exclude: elif self.exclude:
pass for mount in self.mounts:
for pattern in self.exclude:
if pattern in mount.source:
break
else:
filtered.append(mount)
else: else:
return self.mounts return self.mounts