summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAzure.py
diff options
context:
space:
mode:
authorDouglas Jordan <dojordan@microsoft.com>2018-03-10 07:20:08 +0100
committerChad Smith <chad.smith@canonical.com>2018-03-10 07:20:08 +0100
commitf891df345afa57c0c7734e8f04cca9a3d5881778 (patch)
tree74b2ad14be3840a3eb640492b597e371a26cdc3b /cloudinit/sources/DataSourceAzure.py
parentb7a790246e52520b47a467fe89b81199b9cf03f6 (diff)
downloadvyos-cloud-init-f891df345afa57c0c7734e8f04cca9a3d5881778.tar.gz
vyos-cloud-init-f891df345afa57c0c7734e8f04cca9a3d5881778.zip
This commit fixes get_hostname on the AzureDataSource.
LP: #1754495
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r--cloudinit/sources/DataSourceAzure.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 4bcbf3a4..0bb7fad9 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -223,6 +223,8 @@ DEF_PASSWD_REDACTION = 'REDACTED'
def get_hostname(hostname_command='hostname'):
+ if not isinstance(hostname_command, (list, tuple)):
+ hostname_command = (hostname_command,)
return util.subp(hostname_command, capture=True)[0].strip()