1
0
kopia lustrzana https://github.com/arsenetar/dupeguru.git synced 2026-03-13 03:51:38 +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
rodzic 21efef42f7
commit 6abbeaf987
23 zmienionych plików z 619 dodań i 127 usunięć

Wyświetl plik

@@ -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)