Fixed a broken error message in ?delete_item

doc_update
Joey Hines 2018-09-30 15:13:48 -05:00
parent 7a3eb8d112
commit 78fd5a7cc7
2 changed files with 4 additions and 7 deletions

View File

@ -241,8 +241,6 @@ class Commands:
except DataError: except DataError:
session.rollback() session.rollback()
raise DatabaseValueError raise DatabaseValueError
except IndexError:
raise LocationLookUpError
finally: finally:
session.close() session.close()
@ -253,7 +251,7 @@ class Commands:
try: try:
player = self.get_player(session, discord_uuid=discord_uuid, mc_uuid=mc_uuid) player = self.get_player(session, discord_uuid=discord_uuid, mc_uuid=mc_uuid)
location = self.interface.find_location_by_name_and_owner(session, player, loc_name)[0] location = self.get_location(session, player, loc_name)
if location.tunnel is not None: if location.tunnel is not None:
location.tunnel.tunnel_direction = TunnelDirection.str_to_tunnel_dir(tunnel_direction) location.tunnel.tunnel_direction = TunnelDirection.str_to_tunnel_dir(tunnel_direction)

View File

@ -47,11 +47,10 @@ class Delete_Commands:
await ctx.send('{}, **{}** has been removed from the inventory of **{}**.'. await ctx.send('{}, **{}** has been removed from the inventory of **{}**.'.
format(ctx.message.author.mention, item, shop_name)) format(ctx.message.author.mention, item, shop_name))
except NoLocationsInDatabase: except LocationLookUpError:
if shop is None:
await ctx.send('{}, you do have any shops in the database.'.format(ctx.message.author.mention))
else:
await ctx.send('{}, you do not have a shop called **{}**.'.format(ctx.message.author.mention, shop)) await ctx.send('{}, you do not have a shop called **{}**.'.format(ctx.message.author.mention, shop))
except NoLocationsInDatabase:
await ctx.send('{}, you do have any shops in the database.'.format(ctx.message.author.mention))
except EntryNameNotUniqueError: except EntryNameNotUniqueError:
await ctx.send('{}, you have more than one shop in the database, please specify a shop name.' await ctx.send('{}, you have more than one shop in the database, please specify a shop name.'
.format(ctx.message.author.mention)) .format(ctx.message.author.mention))