Browse Source

fix config.get -> config.getint

master
Von Random 6 years ago
parent
commit
b1d44b5582
  1. 2
      plugins/batt.py
  2. 2
      plugins/date.py
  3. 2
      plugins/load.py
  4. 2
      plugins/mem.py

2
plugins/batt.py

@ -12,7 +12,7 @@ class PluginThread(threading.Thread):
self.status = dict()
if config.has_option(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):
with open(BATTERY_DIR + 'capacity', 'r') as capacity, \

2
plugins/date.py

@ -10,7 +10,7 @@ class PluginThread(threading.Thread):
self.status = dict()
if config.has_option(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):
self.status['full_text'] = time.strftime(self.date_format)

2
plugins/load.py

@ -11,7 +11,7 @@ class PluginThread(threading.Thread):
self.status = dict()
if config.has_option(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):
loads = os.getloadavg()

2
plugins/mem.py

@ -10,7 +10,7 @@ class PluginThread(threading.Thread):
self.status = dict()
if config.has_option(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):
mem_stat = psutil.virtual_memory()

Loading…
Cancel
Save