1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Added an Ignore List dialog.

This commit is contained in:
Virgil Dupras
2012-03-14 12:47:21 -04:00
parent ae16845477
commit 3fc83d6245
57 changed files with 1738 additions and 752 deletions

View File

@@ -71,6 +71,25 @@ class IgnoreList:
self._ignored[first] = matches
self._count += 1
def remove(self, first, second):
def inner(first, second):
try:
matches = self._ignored[first]
if second in matches:
matches.discard(second)
if not matches:
del self._ignored[first]
self._count -= 1
return True
else:
return False
except KeyError:
return False
if not inner(first, second):
if not inner(second, first):
raise ValueError()
def load_from_xml(self, infile):
"""Loads the ignore list from a XML created with save_to_xml.