Add tox tests for osm charms in devops
[osm/devops.git] / installers / charm / keystone / src / charm.py
index 637461e..d5c169b 100755 (executable)
@@ -68,6 +68,7 @@ class KeystoneEvents(CharmEvents):
 
     configure_pod = EventSource(ConfigurePodEvent)
 
+
 class KeystoneCharm(CharmBase):
     """Keystone K8s Charm"""
 
@@ -142,7 +143,7 @@ class KeystoneCharm(CharmBase):
             event (EventBase): DB relation event to access database
                                information.
         """
-        if not event.unit in event.relation.data:
+        if event.unit not in event.relation.data:
             return
         relation_data = event.relation.data[event.unit]
         db_host = relation_data.get("host")
@@ -168,7 +169,6 @@ class KeystoneCharm(CharmBase):
             self.state.db_password = db_password
             self.on.configure_pod.emit()
 
-
     def _on_db_relation_departed(self, event: EventBase) -> NoReturn:
         """Clears data from db relation.