[modules/disk] Backwards compatibility
Add support for showUsed, showSize and showPercent, but mark them as deprecated. see #151
This commit is contained in:
parent
2fcff4c2c9
commit
e763b55b86
2 changed files with 35 additions and 5 deletions
|
@ -74,6 +74,10 @@ class Module(object):
|
|||
def update_all(self):
|
||||
self.update(self._widgets)
|
||||
|
||||
def has_parameter(self, name):
|
||||
v = self.parameter(name)
|
||||
return v is not None
|
||||
|
||||
def parameter(self, name, default=None):
|
||||
"""Return the config parameter 'name' for this module"""
|
||||
name = "{}.{}".format(self.name, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue