Revert Context iter changes in 87dc1a44b2 and fix a f-string

Closes #185
This commit is contained in:
Tulir Asokan
2018-07-17 09:48:59 +03:00
parent 88d50879d5
commit e4ce73cbba
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -38,7 +38,10 @@ class Context:
self.session_container = session_container # type: AlchemySessionContainer
self.public_website = public_website # type: PublicBridgeWebsite
self.provisioning_api = provisioning_api # type: ProvisioningAPI
self.t = (self.az, self.db, self.config, self.loop, self.bot)
def __iter__(self):
return iter(self.t)
yield self.az
yield self.db
yield self.config
yield self.loop
yield self.bot
+1 -1
View File
@@ -208,7 +208,7 @@ class MatrixHandler:
self.log.debug(f"Ignoring message \"{message}\" from {sender} to {room}:"
" User is not whitelisted.")
return
self.log.debug("Received Matrix event \"{message}\" from {sender} in {room}")
self.log.debug(f"Received Matrix event \"{message}\" from {sender} in {room}")
portal = Portal.get_by_mxid(room)
if not is_command and portal and (await sender.is_logged_in() or portal.has_bot):