diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-12-28 22:08:15 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-12-28 22:08:15 +0000 |
commit | 1954248e1633036afa72bee39a83c45fb4d60a28 (patch) | |
tree | d54d77602c987f73a5bc395d8b3046dd34f6beca | |
parent | a387b6d9e59c6b25cad87e5eae9e2ae6d5b8f5fe (diff) | |
download | obnam-1954248e1633036afa72bee39a83c45fb4d60a28.tar.gz |
Fix prune_list to handle multiple matches on an item.
-rw-r--r-- | obnamlib/plugins/backup_plugin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py index 8fb85f28..eaccbb94 100644 --- a/obnamlib/plugins/backup_plugin.py +++ b/obnamlib/plugins/backup_plugin.py @@ -191,12 +191,12 @@ class BackupPlugin(obnamlib.ObnamPlugin): '''Remove unwanted things.''' def prune_list(items): - delete = [] + delete = set() for pat in self.exclude_pats: for item in items: path = os.path.join(dirname, item) if pat.search(path): - delete.append(item) + delete.add(item) for path in delete: i = items.index(path) del items[i] |