diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-09 04:08:19 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-09 04:08:19 +0300 |
commit | b4a8e0963c0309d2a4cdb76a4d7f0fd1359383da (patch) | |
tree | fbeaee80be79ae322b58ff9554f0c419cdf22cf1 /track_status.py | |
parent | refactoring (diff) | |
download | vk-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.py | 5 |
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] |