Fix #206 - {kbs} doesn't work if no other traffic formatter is used

This commit is contained in:
enkore 2015-05-28 00:52:38 +02:00
parent a5bd169fd2
commit e395fe31f1

View File

@ -311,7 +311,7 @@ class Network(IntervalModule, ColorRangeModule):
# Don't require importing psutil unless using the functionality it offers.
if any(s in self.format_up or s in self.format_down for s in
['bytes_sent', 'bytes_recv', 'packets_sent', 'packets_recv', 'network_graph']):
['bytes_sent', 'bytes_recv', 'packets_sent', 'packets_recv', 'network_graph', 'kbs']):
self.network_traffic = NetworkTraffic(self.unknown_up, self.divisor, self.round_size)
else:
self.network_traffic = None