Skip to content

Commit

Permalink
🔨 Add trigger key to GetAspectError.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Apr 10, 2020
1 parent 78360e4 commit bc4cfec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dazzler/system/_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ async def set_aspect(self, identity, **aspects):
'payload': prepare_aspects(aspects)
})

async def get_aspect(self, identity, aspect):
async def get_aspect(self, identity: str, aspect: str):
"""
Request the value of an aspect from the frontend.
:param identity:
:param aspect:
:param identity: Component to get aspect from.
:param aspect: Name of the aspect property.
:return:
"""

Expand All @@ -221,7 +221,9 @@ async def get_aspect(self, identity, aspect):

value, error = await response_queue.get()
if value is UNDEFINED:
raise GetAspectError(error)
raise GetAspectError(
error or f'Undefined aspect {aspect}@{identity}'
)

return hydrate(value)

Expand Down

0 comments on commit bc4cfec

Please sign in to comment.