added description to assertion

This commit is contained in:
rhoerbe
2014-03-21 10:53:32 +01:00
parent b11b1e8a97
commit 7acb36344c

View File

@@ -281,7 +281,7 @@ class Client(object):
try:
self.entity_id = _jc["entity_id"]
# Verify its the correct metadata
assert self.entity_id in md.entity.keys()
assert self.entity_id in md.entity.keys(), "Entityid {0} not found in {1}".format(self.entity_id, ', '.join(md.entity.keys()))
except KeyError:
if len(md.entity.keys()) == 1:
self.entity_id = md.entity.keys()[0]