From 38ebe8722021efa3472165cf7268f64c2db3509d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 7 Mar 2019 20:11:32 +0100 Subject: [PATCH] Get the device_id after initializing/creating the device --- platypush/backend/pushbullet/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/pushbullet/__init__.py b/platypush/backend/pushbullet/__init__.py index f54e30e56..2f018badd 100644 --- a/platypush/backend/pushbullet/__init__.py +++ b/platypush/backend/pushbullet/__init__.py @@ -53,7 +53,6 @@ class PushbulletBackend(Backend): self.proxy_host = proxy_host self.proxy_port = proxy_port self.pb = Pushbullet(token) - self.pb_device_id = self.get_device_id() self.listener = None try: @@ -61,6 +60,7 @@ class PushbulletBackend(Backend): except: self.device = self.pb.new_device(self.device_name) + self.pb_device_id = self.get_device_id() def _get_latest_push(self): t = int(time.time()) - 5