From 12e6c400b930d146268476d9b248c1374fd27504 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 15 Aug 2010 14:23:16 +0200 Subject: [PATCH] Fixes here and there to make dupeGuru PE run. --- cocoa/pe/dg_cocoa.py | 8 ++++++-- core/app.py | 2 ++ core_pe/cache.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cocoa/pe/dg_cocoa.py b/cocoa/pe/dg_cocoa.py index 971bfd01..7b6d1907 100644 --- a/cocoa/pe/dg_cocoa.py +++ b/cocoa/pe/dg_cocoa.py @@ -8,9 +8,13 @@ from core.app_cocoa_inter import PyDupeGuruBase, PyDetailsPanel from core_pe import app_cocoa as app_pe_cocoa # Fix py2app imports which chokes on relative imports and other stuff -from core_pe import block, cache, matchbase, data, _block_osx -from lxml import etree, _elementpath +import hsutil.conflict +import core.engine, core.fs, core.app +import core_pe.block, core_pe.cache, core_pe.matchbase, core_pe.data, core_pe._block_osx +import lxml.etree, lxml._elementpath import gzip +import aem.kae +import appscript.defaultterminology class PyDupeGuru(PyDupeGuruBase): def init(self): diff --git a/core/app.py b/core/app.py index b46e6c9a..4e1277af 100644 --- a/core/app.py +++ b/core/app.py @@ -96,6 +96,8 @@ class DupeGuru(RegistrableApplication, Broadcaster): def _get_file(self, str_path): path = Path(str_path) f = fs.get_file(path, self.directories.fileclasses) + if f is None: + return None try: f._read_all_info(attrnames=self.data.METADATA_TO_READ) return f diff --git a/core_pe/cache.py b/core_pe/cache.py index 338baede..cdf9eae0 100644 --- a/core_pe/cache.py +++ b/core_pe/cache.py @@ -10,7 +10,7 @@ import os import logging import sqlite3 as sqlite -from _cache import string_to_colors +from ._cache import string_to_colors def colors_to_string(colors): """Transform the 3 sized tuples 'colors' into a hex string.