cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #01202
[Merge] ~harlowja/cloud-init:sys-io-errors into cloud-init:master
Joshua Harlow has proposed merging ~harlowja/cloud-init:sys-io-errors into cloud-init:master.
Requested reviews:
cloud init development team (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/+git/cloud-init/+merge/305882
--
Your team cloud init development team is requested to review the proposed merge of ~harlowja/cloud-init:sys-io-errors into cloud-init:master.
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 7e58bfe..b48a234 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -147,7 +147,7 @@ def generate_fallback_config():
if carrier:
connected.append(interface)
continue
- except OSError:
+ except (IOError, OSError):
pass
# check if nic is dormant or down, as this may make a nick appear to
# not have a carrier even though it could acquire one when brought
@@ -157,14 +157,14 @@ def generate_fallback_config():
if dormant:
possibly_connected.append(interface)
continue
- except OSError:
+ except (IOError, OSError):
pass
try:
operstate = sys_netdev_info(interface, 'operstate')
if operstate in ['dormant', 'down', 'lowerlayerdown', 'unknown']:
possibly_connected.append(interface)
continue
- except OSError:
+ except (IOError, OSError):
pass
# don't bother with interfaces that might not be connected if there are
Follow ups