cc-4105: add last_ran method for config object. added more comments

This commit is contained in:
Rudi Grinberg 2012-07-23 17:16:51 -04:00
parent d10ca3046d
commit bbe56bcdc3
2 changed files with 9 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import copy
from configobj import ConfigObj
from media.monitor.exceptions import NoConfigFile, ConfigAccessViolation
import media.monitor.pure as mmp
class MMConfig(object):
def __init__(self, path):
@ -27,6 +28,9 @@ class MMConfig(object):
def save(self): self.cfg.write()
def last_ran(self):
return mmp.last_modified(self.cfg['index_path'])
# Remove this after debugging...
def haxxor_set(self, key, value): self.cfg[key] = value
def haxxor_get(self, key): return self.cfg[key]