summaryrefslogtreecommitdiff
path: root/cloudinit/cmd/main.py
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/cmd/main.py
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/cmd/main.py')
-rw-r--r--cloudinit/cmd/main.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/cloudinit/cmd/main.py b/cloudinit/cmd/main.py
index d2f1b778..fcddd75c 100644
--- a/cloudinit/cmd/main.py
+++ b/cloudinit/cmd/main.py
@@ -215,12 +215,10 @@ def main_init(name, args):
if args.local:
deps = [sources.DEP_FILESYSTEM]
- early_logs = []
- early_logs.append(
- attempt_cmdline_url(
- path=os.path.join("%s.d" % CLOUD_CONFIG,
- "91_kernel_cmdline_url.cfg"),
- network=not args.local))
+ early_logs = [attempt_cmdline_url(
+ path=os.path.join("%s.d" % CLOUD_CONFIG,
+ "91_kernel_cmdline_url.cfg"),
+ network=not args.local)]
# Cloud-init 'init' stage is broken up into the following sub-stages
# 1. Ensure that the init object fetches its config without errors