Avoid p_sub not initialized issue

Thanks to @nkasimova (https://github.com/bitfinexcom/bitfinex-api-py/pull/170)
This commit is contained in:
itsdeka
2022-01-04 17:30:32 +01:00
parent 50aa3461cf
commit a6670caf5e

View File

@@ -62,6 +62,7 @@ class SubscriptionManager:
channel = raw_ws_data.get("channel") channel = raw_ws_data.get("channel")
chan_id = raw_ws_data.get("chanId") chan_id = raw_ws_data.get("chanId")
key = raw_ws_data.get("key", None) key = raw_ws_data.get("key", None)
p_sub = None
get_key = "{}_{}".format(channel, key or symbol) get_key = "{}_{}".format(channel, key or symbol)
if chan_id in self.subscriptions_chanid: if chan_id in self.subscriptions_chanid:
# subscription has already existed in the past # subscription has already existed in the past