summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorRémy Léone <rleone@online.net>2018-03-01 18:23:32 +0100
committerScott Moser <smoser@ubuntu.com>2018-03-02 12:53:26 -0500
commitffc6917aa0b97811c1e8503cd4cff9f11c15def1 (patch)
treebb2f58a42472a1d62cc9dfda544f7118a842b80a /cloudinit/sources
parent40e77380e036a24fafe91a63d0cdefada4312348 (diff)
downloadvyos-cloud-init-ffc6917aa0b97811c1e8503cd4cff9f11c15def1.tar.gz
vyos-cloud-init-ffc6917aa0b97811c1e8503cd4cff9f11c15def1.zip
Change some list creation and population to literal.
This will provide a small performance improvement and shorter code.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceOpenNebula.py5
1 files changed, 1 insertions, 4 deletions
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()