summaryrefslogtreecommitdiff
path: root/cloudinit/net/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r--cloudinit/net/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 389c2afb..36f07a02 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -346,7 +346,7 @@ def generate_fallback_config():
name = DEFAULT_PRIMARY_INTERFACE
else:
potential_interfaces.sort(
- key=lambda x: int(x.strip(string.ascii_letters)))
+ key=lambda x: int(''.join(i for i in x if i in string.digits)))
name = potential_interfaces[0]
sysfs_mac = os.path.join(SYS_CLASS_NET, name, 'address')