summaryrefslogtreecommitdiff
path: root/tools/mock-meta.py
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2016-03-03 16:20:10 -0600
committerRyan Harper <ryan.harper@canonical.com>2016-03-03 16:20:10 -0600
commit8cb7c3f7b5339e686bfbf95996b51afafeaf9c9e (patch)
tree6892cca7fb6c81ed150d037a192b9a9d0e30068b /tools/mock-meta.py
parent9a3a490fadc5b61e0fa14cde2d4f79164115ae25 (diff)
downloadvyos-cloud-init-8cb7c3f7b5339e686bfbf95996b51afafeaf9c9e.tar.gz
vyos-cloud-init-8cb7c3f7b5339e686bfbf95996b51afafeaf9c9e.zip
Update pep8 runner and fix pep8 issues
Diffstat (limited to 'tools/mock-meta.py')
-rwxr-xr-xtools/mock-meta.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/mock-meta.py b/tools/mock-meta.py
index dfbc2a71..1c746f17 100755
--- a/tools/mock-meta.py
+++ b/tools/mock-meta.py
@@ -126,11 +126,11 @@ class WebException(Exception):
def yamlify(data):
formatted = yaml.dump(data,
- line_break="\n",
- indent=4,
- explicit_start=True,
- explicit_end=True,
- default_flow_style=False)
+ line_break="\n",
+ indent=4,
+ explicit_start=True,
+ explicit_end=True,
+ default_flow_style=False)
return formatted
@@ -282,7 +282,7 @@ class MetaDataHandler(object):
else:
log.warn(("Did not implement action %s, "
"returning empty response: %r"),
- action, NOT_IMPL_RESPONSE)
+ action, NOT_IMPL_RESPONSE)
return NOT_IMPL_RESPONSE
@@ -404,14 +404,17 @@ def setup_logging(log_level, fmt='%(levelname)s: @%(name)s : %(message)s'):
def extract_opts():
parser = OptionParser()
parser.add_option("-p", "--port", dest="port", action="store", type=int,
- default=80, metavar="PORT",
- help="port from which to serve traffic (default: %default)")
+ default=80, metavar="PORT",
+ help=("port from which to serve traffic"
+ " (default: %default)"))
parser.add_option("-a", "--addr", dest="address", action="store", type=str,
- default='0.0.0.0', metavar="ADDRESS",
- help="address from which to serve traffic (default: %default)")
+ default='0.0.0.0', metavar="ADDRESS",
+ help=("address from which to serve traffic"
+ " (default: %default)"))
parser.add_option("-f", '--user-data-file', dest='user_data_file',
- action='store', metavar='FILE',
- help="user data filename to serve back to incoming requests")
+ action='store', metavar='FILE',
+ help=("user data filename to serve back to"
+ "incoming requests"))
(options, args) = parser.parse_args()
out = dict()
out['extra'] = args