[pylint] Fix Manage-Unmanage with DHSS=True pylint issues

There were some pylint issues in change
https://review.openstack.org/635831. This patch
corrects those.

Change-Id: Ic57510271c5617115fa1018b09105ab480ce06e4
This commit is contained in:
Rodrigo Barbieri 2019-03-05 21:09:51 -03:00
parent d877b61c5e
commit 5f15de40f9
3 changed files with 7 additions and 4 deletions

View File

@ -271,8 +271,9 @@ class ShareSnapshotsController(share_snapshots.ShareSnapshotMixin,
return self._unmanage(req, id, body)
@wsgi.Controller.api_version('2.49') # noqa
@wsgi.action('unmanage') # pylint: disable=function-redefined
def unmanage(self, req, id, body=None):
@wsgi.action('unmanage')
def unmanage(self, req, id,
body=None): # pylint: disable=function-redefined
return self._unmanage(req, id, body, allow_dhss_true=True)
@wsgi.Controller.api_version('2.32')

View File

@ -425,8 +425,9 @@ class ShareController(shares.ShareMixin,
return self._unmanage(req, id, body, allow_dhss_true=False)
@wsgi.Controller.api_version('2.49') # noqa
@wsgi.action('unmanage') # pylint: disable=function-redefined
def unmanage(self, req, id, body=None):
@wsgi.action('unmanage')
def unmanage(self, req, id,
body=None): # pylint: disable=function-redefined
return self._unmanage(req, id, body, allow_dhss_true=True)
@wsgi.Controller.api_version('2.27')

View File

@ -51,6 +51,7 @@ def upgrade():
connection = op.get_bind()
share_servers_table = utils.load_table('share_servers', connection)
for server in connection.execute(share_servers_table.select()):
# pylint: disable=no-value-for-parameter
connection.execute(
share_servers_table.update().where(
share_servers_table.c.id == server.id,