diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2016-03-03 16:20:10 -0600 |
---|---|---|
committer | Ryan Harper <ryan.harper@canonical.com> | 2016-03-03 16:20:10 -0600 |
commit | 8cb7c3f7b5339e686bfbf95996b51afafeaf9c9e (patch) | |
tree | 6892cca7fb6c81ed150d037a192b9a9d0e30068b /tools/mock-meta.py | |
parent | 9a3a490fadc5b61e0fa14cde2d4f79164115ae25 (diff) | |
download | vyos-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-x | tools/mock-meta.py | 27 |
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 |