mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
Fixes to various issues reported by pyflakes
Pyflake is a python (2) source checker. This patch fixes various (mostly trivial) errors and warnings it reports. Change-Id: Ia35c5ac61751b927814cf693994c632c412386ea
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
Asterisk RESTful HTTP binding code.
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from swagger_model import *
|
||||
|
@@ -737,7 +737,7 @@ class ResourceListing(Stringify):
|
||||
self.swagger_version = resources_json.get('swaggerVersion')
|
||||
if not self.swagger_version in SWAGGER_VERSIONS:
|
||||
raise SwaggerError(
|
||||
"Unsupported Swagger version %s" % swagger_version, context)
|
||||
"Unsupported Swagger version %s" % self.swagger_version, context)
|
||||
|
||||
validate_required_fields(resources_json, self.required_fields, context)
|
||||
self.api_version = resources_json['apiVersion']
|
||||
|
@@ -52,7 +52,6 @@ class Transform(object):
|
||||
dest_exists = os.path.exists(dest_file)
|
||||
if dest_exists and not self.overwrite:
|
||||
return
|
||||
tmp_file = tempfile.mkstemp()
|
||||
with tempfile.NamedTemporaryFile() as out:
|
||||
out.write(renderer.render(self.template, model))
|
||||
out.flush()
|
||||
|
Reference in New Issue
Block a user