summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAzure.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-12 10:56:26 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-12 10:56:26 -0700
commitf11827aee59cf2678c3d2a157218a3fe2831f5c2 (patch)
tree94c8f39d66d003b7d0d211dd521b64b5041287b3 /cloudinit/sources/DataSourceAzure.py
parent690bdce9a73ec6d00b4eebbbca31cc527e7b2fce (diff)
downloadvyos-cloud-init-f11827aee59cf2678c3d2a157218a3fe2831f5c2.tar.gz
vyos-cloud-init-f11827aee59cf2678c3d2a157218a3fe2831f5c2.zip
Fix up a ton of flake8 issues
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r--cloudinit/sources/DataSourceAzure.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 698f4cac..2d046600 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -27,11 +27,12 @@ import xml.etree.ElementTree as ET
from xml.dom import minidom
+from cloudinit.sources.helpers.azure import get_metadata_from_fabric
+
from cloudinit import log as logging
from cloudinit.settings import PER_ALWAYS
from cloudinit import sources
from cloudinit import util
-from cloudinit.sources.helpers.azure import get_metadata_from_fabric
LOG = logging.getLogger(__name__)
@@ -40,7 +41,8 @@ DEFAULT_METADATA = {"instance-id": "iid-AZURE-NODE"}
AGENT_START = ['service', 'walinuxagent', 'start']
BOUNCE_COMMAND = [
'sh', '-xc',
- "i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x"]
+ "i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x"
+]
BUILTIN_DS_CONFIG = {
'agent_command': AGENT_START,
@@ -51,7 +53,7 @@ BUILTIN_DS_CONFIG = {
'policy': True,
'command': BOUNCE_COMMAND,
'hostname_command': 'hostname',
- },
+ },
'disk_aliases': {'ephemeral0': '/dev/sdb'},
}
@@ -60,7 +62,7 @@ BUILTIN_CLOUD_CONFIG = {
'ephemeral0': {'table_type': 'gpt',
'layout': [100],
'overwrite': True},
- },
+ },
'fs_setup': [{'filesystem': 'ext4',
'device': 'ephemeral0.1',
'replace_fs': 'ntfs'}],
@@ -312,7 +314,7 @@ def support_new_ephemeral(cfg):
file_count = 0
try:
file_count = util.mount_cb(device, count_files)
- except:
+ except Exception:
return None
LOG.debug("fabric prepared ephmeral0.1 has %s files on it", file_count)