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

Refactoring: Moved some code from app.DupeGuru to fs.File.

Moved DupeGuru._get_display_info() to File.get_display_info().
This method used none of the app's global state or methods
and had nothing to do there.
This commit is contained in:
Virgil Dupras
2013-07-14 17:43:58 -04:00
parent bdd5f0a515
commit 7891fb5396
9 changed files with 150 additions and 133 deletions

View File

@@ -128,9 +128,6 @@ class DupeGuru(RegistrableApplication, Broadcaster):
child.connect()
#--- Virtual
def _get_display_info(self, dupe, group, delta):
raise NotImplementedError()
def _prioritization_categories(self):
raise NotImplementedError()
@@ -389,7 +386,7 @@ class DupeGuru(RegistrableApplication, Broadcaster):
if (dupe is None) or (group is None):
return empty_data()
try:
return self._get_display_info(dupe, group, delta)
return dupe.get_display_info(group, delta)
except Exception as e:
logging.warning("Exception on GetDisplayInfo for %s: %s", str(dupe.path), str(e))
return empty_data()