Skip to content

Commit

Permalink
let robot accessible after blueprint registered
Browse files Browse the repository at this point in the history
  • Loading branch information
lanfon72 committed Dec 6, 2019
1 parent 3327be8 commit 42f6d33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiohubot/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ class Blueprint:
def __init__(self):
self.holds = dict()
self.router = web.RouteTableDef()
self.robot = None

def __call__(self, robot):
self.robot = robot
for delegatee, handlers in self.holds.items():
for kws in handlers:
getattr(robot, delegatee)(**kws)
Expand Down

0 comments on commit 42f6d33

Please sign in to comment.