Created
October 26, 2022 20:59
-
-
Save igalic/e05440564d52fa70f78fa48230085d44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cloudinit/distros/networking.py b/cloudinit/distros/networking.py | |
index ea966283..877887b4 100644 | |
--- a/cloudinit/distros/networking.py | |
+++ b/cloudinit/distros/networking.py | |
@@ -195,8 +195,9 @@ class BSDNetworking(Networking): | |
self._update_ifs() | |
def _update_ifs(self): | |
- ifs_txt, _ = subp.subp(["ifconfig", "-a"]) | |
- self.ifs = self.ifc.parse(ifs_txt) | |
+ ifconf = subp.subp(["ifconfig", "-a"]) | |
+ if ifconf[0]: | |
+ self.ifs = self.ifc.parse(ifconf[0]) | |
def apply_network_config_names(self, netcfg: NetworkConfig) -> None: | |
LOG.debug("Cannot rename network interface.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment