Skip to content

Commit

Permalink
simplify public_subscribe update
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuefeng-Zhu authored Aug 23, 2016
1 parent 7e33a0d commit dedbc62
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions publish_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ def unsubscribe(self, msg, subscriber):

def update(self):
for msg in self.msg_queue:
if msg in self.subscribers:
for sub in self.subscribers[msg]:
sub.run(msg)
for sub in self.subscribers.get(msg, []):
sub.run(msg)
self.msg_queue = []


Expand Down

0 comments on commit dedbc62

Please sign in to comment.