mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
Merge "Fixes to various issues reported by pyflakes"
This commit is contained in:
@@ -9,11 +9,8 @@ the GNU General Public License Version 2.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
|
||||||
from xml.dom.minidom import Element
|
|
||||||
|
|
||||||
|
|
||||||
def get_manager_event_method_type(candidate_string):
|
def get_manager_event_method_type(candidate_string):
|
||||||
if "ast_manager_event_multichan" in candidate_string:
|
if "ast_manager_event_multichan" in candidate_string:
|
||||||
|
@@ -9,11 +9,9 @@ the GNU General Public License Version 2.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import optparse
|
import optparse
|
||||||
import xml.dom.minidom
|
|
||||||
|
|
||||||
from xml.dom.minidom import Element, parse
|
from xml.dom.minidom import parse
|
||||||
|
|
||||||
|
|
||||||
def merge_parameter_information(managerEvent):
|
def merge_parameter_information(managerEvent):
|
||||||
|
@@ -11,7 +11,6 @@ revision = '4c573e7135bd'
|
|||||||
down_revision = '28887f25a46f'
|
down_revision = '28887f25a46f'
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
from alembic import context
|
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects.postgresql import ENUM
|
from sqlalchemy.dialects.postgresql import ENUM
|
||||||
|
|
||||||
|
@@ -33,7 +33,6 @@ import sqlalchemy as sa
|
|||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
context = op.get_context()
|
|
||||||
# Was unable to find a way to use op.alter_column() to add the unique
|
# Was unable to find a way to use op.alter_column() to add the unique
|
||||||
# index property.
|
# index property.
|
||||||
op.drop_column('queue_members', 'uniqueid')
|
op.drop_column('queue_members', 'uniqueid')
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
Asterisk RESTful HTTP binding code.
|
Asterisk RESTful HTTP binding code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from swagger_model import *
|
from swagger_model import *
|
||||||
|
@@ -737,7 +737,7 @@ class ResourceListing(Stringify):
|
|||||||
self.swagger_version = resources_json.get('swaggerVersion')
|
self.swagger_version = resources_json.get('swaggerVersion')
|
||||||
if not self.swagger_version in SWAGGER_VERSIONS:
|
if not self.swagger_version in SWAGGER_VERSIONS:
|
||||||
raise SwaggerError(
|
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)
|
validate_required_fields(resources_json, self.required_fields, context)
|
||||||
self.api_version = resources_json['apiVersion']
|
self.api_version = resources_json['apiVersion']
|
||||||
|
@@ -52,7 +52,6 @@ class Transform(object):
|
|||||||
dest_exists = os.path.exists(dest_file)
|
dest_exists = os.path.exists(dest_file)
|
||||||
if dest_exists and not self.overwrite:
|
if dest_exists and not self.overwrite:
|
||||||
return
|
return
|
||||||
tmp_file = tempfile.mkstemp()
|
|
||||||
with tempfile.NamedTemporaryFile() as out:
|
with tempfile.NamedTemporaryFile() as out:
|
||||||
out.write(renderer.render(self.template, model))
|
out.write(renderer.render(self.template, model))
|
||||||
out.flush()
|
out.flush()
|
||||||
|
Reference in New Issue
Block a user