fix config.get -> config.getint

This commit is contained in:
Von Random 2016-10-23 02:27:27 +03:00
parent b839f9f114
commit b1d44b5582
4 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ class PluginThread(threading.Thread):
self.status = dict() self.status = dict()
if config.has_option(section, 'color'): if config.has_option(section, 'color'):
self.status['color'] = config.get(section, 'color') self.status['color'] = config.get(section, 'color')
self.freq = config.get(section, 'freq', fallback=1) self.freq = config.getint(section, 'freq', fallback=1)
def main(self): def main(self):
with open(BATTERY_DIR + 'capacity', 'r') as capacity, \ with open(BATTERY_DIR + 'capacity', 'r') as capacity, \

View file

@ -10,7 +10,7 @@ class PluginThread(threading.Thread):
self.status = dict() self.status = dict()
if config.has_option(section, 'color'): if config.has_option(section, 'color'):
self.status['color'] = config.get(section, 'color') self.status['color'] = config.get(section, 'color')
self.freq = config.get(section, 'freq', fallback=1) self.freq = config.getint(section, 'freq', fallback=1)
def main(self): def main(self):
self.status['full_text'] = time.strftime(self.date_format) self.status['full_text'] = time.strftime(self.date_format)

View file

@ -11,7 +11,7 @@ class PluginThread(threading.Thread):
self.status = dict() self.status = dict()
if config.has_option(section, 'color'): if config.has_option(section, 'color'):
self.status['color'] = config.get(section, 'color') self.status['color'] = config.get(section, 'color')
self.freq = config.get(section, 'freq', fallback=10) self.freq = config.getint(section, 'freq', fallback=10)
def main(self): def main(self):
loads = os.getloadavg() loads = os.getloadavg()

View file

@ -10,7 +10,7 @@ class PluginThread(threading.Thread):
self.status = dict() self.status = dict()
if config.has_option(section, 'color'): if config.has_option(section, 'color'):
self.status['color'] = config.get(section, 'color') self.status['color'] = config.get(section, 'color')
self.freq = config.get(section, 'freq', fallback=1) self.freq = config.getint(section, 'freq', fallback=1)
def main(self): def main(self):
mem_stat = psutil.virtual_memory() mem_stat = psutil.virtual_memory()