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

[#132 state:fixed] Added a debug mode preference as well as extra debug loggings.

This commit is contained in:
Virgil Dupras
2011-01-26 12:50:44 +01:00
parent 21efef42f7
commit 6abbeaf987
23 changed files with 619 additions and 127 deletions

View File

@@ -30,12 +30,16 @@ JOB_COPY = 'job_copy'
JOB_DELETE = 'job_delete'
HAD_FIRST_LAUNCH_PREFERENCE = 'HadFirstLaunch'
DEBUG_MODE_PREFERENCE = 'DebugMode'
class NoScannableFileError(Exception):
pass
class DupeGuru(RegistrableApplication, Broadcaster):
def __init__(self, data_module, appdata):
if self.get_default(DEBUG_MODE_PREFERENCE, False):
logging.getLogger().setLevel(logging.DEBUG)
logging.debug("Debug mode enabled")
RegistrableApplication.__init__(self, appid=1)
Broadcaster.__init__(self)
self.is_first_run = not self.get_default(HAD_FIRST_LAUNCH_PREFERENCE, False)