From b0f9e2125c70007d25cd84eb52e6aee0605cfff0 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 25 Apr 2019 17:11:28 +0100 Subject: [PATCH] Update converted to utilise async crumbs collections properly --- Houdini/Converters.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Houdini/Converters.py b/Houdini/Converters.py index 124e3f9..496216d 100644 --- a/Houdini/Converters.py +++ b/Houdini/Converters.py @@ -218,7 +218,7 @@ class RoomConverter(IConverter): async def convert(self, ctx): room_id = int(ctx.argument) if room_id in ctx.p.server.rooms: - return ctx.p.server.rooms[room_id] + return await ctx.p.server.rooms.get(room_id) return None @@ -229,7 +229,7 @@ class ItemConverter(IConverter): async def convert(self, ctx): item_id = int(ctx.argument) if item_id in ctx.p.server.items: - return ctx.p.server.items[item_id] + return await ctx.p.server.items.get(item_id) return None @@ -240,7 +240,7 @@ class IglooConverter(IConverter): async def convert(self, ctx): igloo_id = int(ctx.argument) if igloo_id in ctx.p.server.igloos: - return ctx.p.server.igloos[igloo_id] + return await ctx.p.server.igloos.get(igloo_id) return None @@ -251,7 +251,7 @@ class FurnitureConverter(IConverter): async def convert(self, ctx): furniture_id = int(ctx.argument) if furniture_id in ctx.p.server.furniture: - return ctx.p.server.furniture[furniture_id] + return await ctx.p.server.furniture.get(furniture_id) return None @@ -262,7 +262,7 @@ class FlooringConverter(IConverter): async def convert(self, ctx): flooring_id = int(ctx.argument) if flooring_id in ctx.p.server.flooring: - return ctx.p.server.flooring[flooring_id] + return await ctx.p.server.flooring.get(flooring_id) return None @@ -273,7 +273,7 @@ class StampConverter(IConverter): async def convert(self, ctx): stamp_id = int(ctx.argument) if stamp_id in ctx.p.server.stamps: - return ctx.p.server.stamps[stamp_id] + return await ctx.p.server.stamps.get(stamp_id) return None