diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-15 20:16:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 19:16:38 -0700 |
commit | bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch) | |
tree | 1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /cloudinit/distros/networking.py | |
parent | 2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff) | |
download | vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.tar.gz vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.zip |
Adopt Black and isort (SC-700) (#1157)
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
Diffstat (limited to 'cloudinit/distros/networking.py')
-rw-r--r-- | cloudinit/distros/networking.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cloudinit/distros/networking.py b/cloudinit/distros/networking.py index c291196a..e18a48ca 100644 --- a/cloudinit/distros/networking.py +++ b/cloudinit/distros/networking.py @@ -2,9 +2,7 @@ import abc import logging import os -from cloudinit import subp -from cloudinit import net, util - +from cloudinit import net, subp, util LOG = logging.getLogger(__name__) @@ -73,7 +71,8 @@ class Networking(metaclass=abc.ABCMeta): def get_interfaces_by_mac(self) -> dict: return net.get_interfaces_by_mac( - blacklist_drivers=self.blacklist_drivers) + blacklist_drivers=self.blacklist_drivers + ) def get_master(self, devname: DeviceName): return net.get_master(devname) @@ -225,7 +224,7 @@ class LinuxNetworking(Networking): def try_set_link_up(self, devname: DeviceName) -> bool: """Try setting the link to up explicitly and return if it is up. - Not guaranteed to bring the interface up. The caller is expected to - add wait times before retrying.""" - subp.subp(['ip', 'link', 'set', devname, 'up']) + Not guaranteed to bring the interface up. The caller is expected to + add wait times before retrying.""" + subp.subp(["ip", "link", "set", devname, "up"]) return self.is_up(devname) |