diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-03-26 23:22:12 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-03-26 23:22:12 -0400 |
commit | b9cdcb6a8ef499c6e3be178fb5f59d369eb3b169 (patch) | |
tree | af274690839759d3fd4f0537089a5b5337a1e42f | |
parent | feab0f913b2c3e98cf5200ea2dd7c19aed347395 (diff) | |
download | vyos-cloud-init-b9cdcb6a8ef499c6e3be178fb5f59d369eb3b169.tar.gz vyos-cloud-init-b9cdcb6a8ef499c6e3be178fb5f59d369eb3b169.zip |
fix scope so that SNAPPY_CMD is affected by set_snappy_command
-rw-r--r-- | cloudinit/config/cc_snappy.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/config/cc_snappy.py b/cloudinit/config/cc_snappy.py index de6fae4b..e664234a 100644 --- a/cloudinit/config/cc_snappy.py +++ b/cloudinit/config/cc_snappy.py @@ -194,11 +194,12 @@ def system_is_snappy(): def set_snappy_command(): + global SNAPPY_CMD if util.which("snappy-go"): - SNAPPY_COMMAND = "snappy-go" + SNAPPY_CMD = "snappy-go" else: - SNAPPY_COMMAND = "snappy" - LOG.debug("snappy command is '%s'", SNAPPY_COMMAND) + SNAPPY_CMD = "snappy" + LOG.debug("snappy command is '%s'", SNAPPY_CMD) def handle(name, cfg, cloud, log, args): |