Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 74261cb

Browse files
author
luk
committed
Make registered subscription callbacks tied to the reactor object.
This makes it easier for the user to decide, if the subscription reactor and thus the registered callbacks should be global (by creating the reactor in a module) and where the callbacks should be added.
1 parent e885e7d commit 74261cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

instagram/subscriptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class SubscriptionVerifyError(SubscriptionError):
1919

2020
class SubscriptionsReactor(object):
2121

22-
callbacks = {}
22+
def __init__(self):
23+
self.callbacks = {}
2324

2425
def _process_update(self, update):
2526
object_callbacks = self.callbacks.get(update['object'], [])

0 commit comments

Comments
 (0)