aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/track_status.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-09 04:08:19 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-09 04:08:19 +0300
commitb4a8e0963c0309d2a4cdb76a4d7f0fd1359383da (patch)
treefbeaee80be79ae322b58ff9554f0c419cdf22cf1 /track_status.py
parentrefactoring (diff)
downloadvk-scripts-b4a8e0963c0309d2a4cdb76a4d7f0fd1359383da.tar.gz
vk-scripts-b4a8e0963c0309d2a4cdb76a4d7f0fd1359383da.zip
track_status.py: ignore connection errors
This closes (hopefully) #1.
Diffstat (limited to '')
-rw-r--r--track_status.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/track_status.py b/track_status.py
index 2761b2b..129b236 100644
--- a/track_status.py
+++ b/track_status.py
@@ -65,7 +65,10 @@ def loop_update_status(api, uids, timeout=DEFAULT_TIMEOUT):
print_status(users[uid])
while True:
time.sleep(timeout)
- updated_users = update_status(api, uids)
+ try:
+ updated_users = update_status(api, uids)
+ except API.ConnectionError:
+ continue
for uid in updated_users:
if users[uid].is_online() != updated_users[uid].is_online():
users[uid] = updated_users[uid]