diff options
| author | Bin Li <bin.li@canonical.com> | 2022-06-17 20:45:20 +0800 |
|---|---|---|
| committer | Bin Li <bin.li@canonical.com> | 2022-06-17 20:45:20 +0800 |
| commit | 7f9ee27f72891187beb183661cc1385ddee5bfff (patch) | |
| tree | b4c1e333db39d978d55043d7a7b294d434e2e9eb | |
| parent | 263c9c65984d8a56ef5a9c4487dcccb657026b6c (diff) | |
fixed E501 line too long (90 > 79 characters)
| -rwxr-xr-x | bin/net_if_management.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/net_if_management.py b/bin/net_if_management.py index 766d957..a6d59e5 100755 --- a/bin/net_if_management.py +++ b/bin/net_if_management.py @@ -36,7 +36,8 @@ def log(msg): def get_network_interfaces(category): names = [] cmd = 'udevadm info --export-db' - output = sp.check_output(cmd, shell=True).decode(sys.stdout.encoding, errors='ignore') + output = sp.check_output(cmd, shell=True).decode( + sys.stdout.encoding, errors='ignore') udev = UdevadmParser(output) for device in udev.run(): if category == getattr(device, "category", None): @@ -66,7 +67,8 @@ class NmInterfaceState(): def parse(self, data=None): if data is None: cmd = 'nmcli -t -f DEVICE,STATE d' - data = sp.check_output(cmd, shell=True).decode(sys.stdout.encoding, errors='ignore') + data = sp.check_output(cmd, shell=True).decode( + sys.stdout.encoding, errors='ignore') for line in data.splitlines(): dev, state = line.strip().rsplit(':', maxsplit=1) self.devices[dev] = state |
