From ffc6917aa0b97811c1e8503cd4cff9f11c15def1 Mon Sep 17 00:00:00 2001 From: Rémy Léone Date: Thu, 1 Mar 2018 18:23:32 +0100 Subject: Change some list creation and population to literal. This will provide a small performance improvement and shorter code. --- cloudinit/sources/DataSourceOpenNebula.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cloudinit/sources/DataSourceOpenNebula.py') diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py index ce47b6bd..9450835e 100644 --- a/cloudinit/sources/DataSourceOpenNebula.py +++ b/cloudinit/sources/DataSourceOpenNebula.py @@ -173,10 +173,7 @@ class OpenNebulaNetwork(object): def gen_conf(self): global_dns = self.context.get('DNS', "").split() - conf = [] - conf.append('auto lo') - conf.append('iface lo inet loopback') - conf.append('') + conf = ['auto lo', 'iface lo inet loopback', ''] for mac, dev in self.ifaces.items(): mac = mac.lower() -- cgit v1.2.3