cc-4105: add last_ran method for config object. added more comments
This commit is contained in:
parent
d10ca3046d
commit
bbe56bcdc3
2 changed files with 9 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue