Add Python 2.7 support

This commit is contained in:
Thaynã B. Moretti 2019-05-13 20:53:31 -03:00
parent c0706070ab
commit 3031077713
No known key found for this signature in database
GPG key ID: 6F6E110817B19E8D

View file

@ -41,7 +41,7 @@ class Module(bumblebee.engine.Module):
)) ))
class BandwidthInfo: class BandwidthInfo(object):
def __init__(self): def __init__(self):
io_counters = self.io_counters() io_counters = self.io_counters()
self.network = io_counters[self.default_network_adapter()] self.network = io_counters[self.default_network_adapter()]
@ -64,7 +64,7 @@ class BandwidthInfo:
return psutil.net_io_counters(pernic=True) return psutil.net_io_counters(pernic=True)
class TrafficWidget: class TrafficWidget(object):
def __new__(self, text, icon): def __new__(self, text, icon):
widget = bumblebee.output.Widget() widget = bumblebee.output.Widget()
widget.set('theme.minwidth', '00000000KiB/s') widget.set('theme.minwidth', '00000000KiB/s')