PEP 8 (I'm bored): network
This commit is contained in:
parent
29a0278bc5
commit
a07539f126
@ -5,7 +5,7 @@ import netifaces
|
|||||||
|
|
||||||
from i3pystatus import IntervalModule
|
from i3pystatus import IntervalModule
|
||||||
|
|
||||||
# Remainder: if we raise minimum Python version to 3.3, use ipaddress module
|
# Reminder: if we raise minimum Python version to 3.3, use ipaddress module
|
||||||
|
|
||||||
|
|
||||||
def count_bits(integer):
|
def count_bits(integer):
|
||||||
@ -59,7 +59,7 @@ def get_bonded_slaves():
|
|||||||
return slaves
|
return slaves
|
||||||
|
|
||||||
|
|
||||||
def sysfs_interface_up(interface, unknown_up = False):
|
def sysfs_interface_up(interface, unknown_up=False):
|
||||||
try:
|
try:
|
||||||
with open("/sys/class/net/{}/operstate".format(interface)) as f:
|
with open("/sys/class/net/{}/operstate".format(interface)) as f:
|
||||||
status = f.read().strip()
|
status = f.read().strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user