Andrew Bogott has submitted this change and it was merged.

Change subject: Follow-up I026e4f57: Fix style
......................................................................


Follow-up I026e4f57: Fix style

Change-Id: I2e12cdb83a938c61ea9083d27853344f75cb8e80
---
M modules/openstack/files/kilo/designate/nova_ldap/__init__.py
M modules/openstack/files/kilo/designate/nova_ldap/base.py
M modules/openstack/files/liberty/designate/nova_ldap/__init__.py
M modules/openstack/files/liberty/designate/nova_ldap/base.py
M modules/openstack/files/mitaka/designate/nova_ldap/__init__.py
M modules/openstack/files/mitaka/designate/nova_ldap/base.py
M tox.ini
7 files changed, 13 insertions(+), 76 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/openstack/files/kilo/designate/nova_ldap/__init__.py 
b/modules/openstack/files/kilo/designate/nova_ldap/__init__.py
index 711e39e..e69de29 100644
--- a/modules/openstack/files/kilo/designate/nova_ldap/__init__.py
+++ b/modules/openstack/files/kilo/designate/nova_ldap/__init__.py
@@ -1,18 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import gettext
-import logging
diff --git a/modules/openstack/files/kilo/designate/nova_ldap/base.py 
b/modules/openstack/files/kilo/designate/nova_ldap/base.py
index f4305cc..036fd5a 100644
--- a/modules/openstack/files/kilo/designate/nova_ldap/base.py
+++ b/modules/openstack/files/kilo/designate/nova_ldap/base.py
@@ -13,13 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import abc
 from oslo_config import cfg
-from designate import exceptions
 from designate.central import rpcapi as central_rpcapi
-from designate.context import DesignateContext
 from designate.notification_handler.base import BaseAddressHandler
-from designate.plugin import ExtensionPlugin
 from keystoneclient.auth.identity import v3
 from keystoneclient import client
 from keystoneclient import exceptions as keystoneexceptions
@@ -91,8 +87,9 @@
             LOG.debug("LDAP bind failure:  The bind DN is incorrect... \n")
         except ldap.NO_SUCH_OBJECT:
             LOG.debug("LDAP bind failure:  Unable to locate the bind DN 
account.\n")
-        except ldap.UNWILLING_TO_PERFORM, msg:
-            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action requested.\nError was: %s\n" % msg[0]["info"])
+        except ldap.UNWILLING_TO_PERFORM as msg:
+            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action"
+                      " requested.\nError was: %s\n" % msg[0]["info"])
         except ldap.INVALID_CREDENTIALS:
             LOG.debug("LDAP bind failure:  Password incorrect.\n")
 
@@ -251,7 +248,7 @@
             passwd = cfg.CONF[self.name].keystone_auth_pass
             project = cfg.CONF[self.name].keystone_auth_project
             url = cfg.CONF[self.name].keystone_auth_url
-        except keyerror:
+        except KeyError:
             LOG.debug('Missing a config setting for keystone auth.')
             return
 
diff --git a/modules/openstack/files/liberty/designate/nova_ldap/__init__.py 
b/modules/openstack/files/liberty/designate/nova_ldap/__init__.py
index 711e39e..e69de29 100644
--- a/modules/openstack/files/liberty/designate/nova_ldap/__init__.py
+++ b/modules/openstack/files/liberty/designate/nova_ldap/__init__.py
@@ -1,18 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import gettext
-import logging
diff --git a/modules/openstack/files/liberty/designate/nova_ldap/base.py 
b/modules/openstack/files/liberty/designate/nova_ldap/base.py
index f4305cc..036fd5a 100644
--- a/modules/openstack/files/liberty/designate/nova_ldap/base.py
+++ b/modules/openstack/files/liberty/designate/nova_ldap/base.py
@@ -13,13 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import abc
 from oslo_config import cfg
-from designate import exceptions
 from designate.central import rpcapi as central_rpcapi
-from designate.context import DesignateContext
 from designate.notification_handler.base import BaseAddressHandler
-from designate.plugin import ExtensionPlugin
 from keystoneclient.auth.identity import v3
 from keystoneclient import client
 from keystoneclient import exceptions as keystoneexceptions
@@ -91,8 +87,9 @@
             LOG.debug("LDAP bind failure:  The bind DN is incorrect... \n")
         except ldap.NO_SUCH_OBJECT:
             LOG.debug("LDAP bind failure:  Unable to locate the bind DN 
account.\n")
-        except ldap.UNWILLING_TO_PERFORM, msg:
-            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action requested.\nError was: %s\n" % msg[0]["info"])
+        except ldap.UNWILLING_TO_PERFORM as msg:
+            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action"
+                      " requested.\nError was: %s\n" % msg[0]["info"])
         except ldap.INVALID_CREDENTIALS:
             LOG.debug("LDAP bind failure:  Password incorrect.\n")
 
@@ -251,7 +248,7 @@
             passwd = cfg.CONF[self.name].keystone_auth_pass
             project = cfg.CONF[self.name].keystone_auth_project
             url = cfg.CONF[self.name].keystone_auth_url
-        except keyerror:
+        except KeyError:
             LOG.debug('Missing a config setting for keystone auth.')
             return
 
diff --git a/modules/openstack/files/mitaka/designate/nova_ldap/__init__.py 
b/modules/openstack/files/mitaka/designate/nova_ldap/__init__.py
index 711e39e..e69de29 100644
--- a/modules/openstack/files/mitaka/designate/nova_ldap/__init__.py
+++ b/modules/openstack/files/mitaka/designate/nova_ldap/__init__.py
@@ -1,18 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import gettext
-import logging
diff --git a/modules/openstack/files/mitaka/designate/nova_ldap/base.py 
b/modules/openstack/files/mitaka/designate/nova_ldap/base.py
index f4305cc..036fd5a 100644
--- a/modules/openstack/files/mitaka/designate/nova_ldap/base.py
+++ b/modules/openstack/files/mitaka/designate/nova_ldap/base.py
@@ -13,13 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import abc
 from oslo_config import cfg
-from designate import exceptions
 from designate.central import rpcapi as central_rpcapi
-from designate.context import DesignateContext
 from designate.notification_handler.base import BaseAddressHandler
-from designate.plugin import ExtensionPlugin
 from keystoneclient.auth.identity import v3
 from keystoneclient import client
 from keystoneclient import exceptions as keystoneexceptions
@@ -91,8 +87,9 @@
             LOG.debug("LDAP bind failure:  The bind DN is incorrect... \n")
         except ldap.NO_SUCH_OBJECT:
             LOG.debug("LDAP bind failure:  Unable to locate the bind DN 
account.\n")
-        except ldap.UNWILLING_TO_PERFORM, msg:
-            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action requested.\nError was: %s\n" % msg[0]["info"])
+        except ldap.UNWILLING_TO_PERFORM as msg:
+            LOG.debug("LDAP bind failure:  The LDAP server was unwilling to 
perform the action"
+                      " requested.\nError was: %s\n" % msg[0]["info"])
         except ldap.INVALID_CREDENTIALS:
             LOG.debug("LDAP bind failure:  Password incorrect.\n")
 
@@ -251,7 +248,7 @@
             passwd = cfg.CONF[self.name].keystone_auth_pass
             project = cfg.CONF[self.name].keystone_auth_project
             url = cfg.CONF[self.name].keystone_auth_url
-        except keyerror:
+        except KeyError:
             LOG.debug('Missing a config setting for keystone auth.')
             return
 
diff --git a/tox.ini b/tox.ini
index 018a21a..5cd81db 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,7 +10,7 @@
 # E402: module level import not at top of file
 ignore = E123,E133,E226,E241,E242,E402
 # Upstream files that don't pass flake8 but should not be locally modified
-exclude = 
modules/letsencrypt/files/acme_tiny.py,modules/varnish/files/varnishapi.py,modules/postgresql/files/check_postgres_replication_lag.py,modules/openstack/files/kilo/designate/nova_ldap,modules/openstack/files/liberty/designate/nova_ldap,modules/openstack/files/mitaka/designate/nova_ldap
+exclude = 
modules/letsencrypt/files/acme_tiny.py,modules/varnish/files/varnishapi.py,modules/postgresql/files/check_postgres_replication_lag.py
 
 [testenv]
 deps =

-- 
To view, visit https://gerrit.wikimedia.org/r/308876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e12cdb83a938c61ea9083d27853344f75cb8e80
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to