aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/status_tracker.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-19 01:36:19 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-19 01:36:19 +0300
commitdd88c8103e13f108a0fed51a82221fdf60f6a188 (patch)
tree14c0038cd71f9e4a8208278b4e9b5f67e1a91c47 /vk/tracking/status_tracker.py
parentremove commented out code (diff)
downloadvk-scripts-dd88c8103e13f108a0fed51a82221fdf60f6a188.tar.gz
vk-scripts-dd88c8103e13f108a0fed51a82221fdf60f6a188.zip
add Pylint configuration & fix the warnings
Diffstat (limited to '')
-rw-r--r--vk/tracking/status_tracker.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/vk/tracking/status_tracker.py b/vk/tracking/status_tracker.py
index 8faea8e..bb5f186 100644
--- a/vk/tracking/status_tracker.py
+++ b/vk/tracking/status_tracker.py
@@ -22,9 +22,9 @@ class StatusTracker:
time.sleep(self._timeout)
def add_database_writer(self, writer):
- self.add_initial_status_handler(lambda user: writer.on_initial_status(user))
- self.add_status_update_handler(lambda user: writer.on_status_update(user))
- self.add_connection_error_handler(lambda e: writer.on_connection_error(e))
+ self.add_initial_status_handler(writer.on_initial_status)
+ self.add_status_update_handler(writer.on_status_update)
+ self.add_connection_error_handler(writer.on_connection_error)
def add_initial_status_handler(self, fn):
self._assert_is_callback(fn)
@@ -64,7 +64,7 @@ class StatusTracker:
while True:
try:
return self._query_status(uids)
- except vk.error.ConnectionError as e:
+ except vk.error.APIConnectionError as e:
self._notify_connection_error(e)
self._wait_after_connection_error()
@@ -73,7 +73,7 @@ class StatusTracker:
self._wait_after_connection_error()
try:
return self._query_status(uids)
- except vk.error.ConnectionError as e:
+ except vk.error.APIConnectionError as e:
self._notify_connection_error(e)
@staticmethod