diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-23 07:20:36 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-23 07:20:36 +0300 |
commit | 7b8cc8a9f455eda41b9c7d70f4561a84fcda941e (patch) | |
tree | b9e262e9a1dbb663c3b9f704a9fe4daf54be0ce9 /bin/show_status.py | |
parent | Travis: online_sessions.sh: refactoring (diff) | |
download | vk-scripts-7b8cc8a9f455eda41b9c7d70f4561a84fcda941e.tar.gz vk-scripts-7b8cc8a9f455eda41b9c7d70f4561a84fcda941e.zip |
pylint/pep8 fixes
Diffstat (limited to '')
-rw-r--r-- | bin/show_status.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/show_status.py b/bin/show_status.py index 1ca9cb5..cf59280 100644 --- a/bin/show_status.py +++ b/bin/show_status.py @@ -3,12 +3,14 @@ # For details, see https://github.com/egor-tensin/vk-scripts. # Distributed under the MIT License. -import argparse, sys +import argparse +import sys from vk.api import API from vk.tracking import StatusTracker from vk.tracking.db import Format as DatabaseFormat + def _parse_args(args=None): if args is None: args = sys.argv[1:] @@ -23,6 +25,7 @@ def _parse_args(args=None): return parser.parse_args(args) + def track_status(uids, log_path=None): api = API() tracker = StatusTracker(api) @@ -32,8 +35,10 @@ def track_status(uids, log_path=None): tracker.add_database_writer(log_writer) tracker.query_status(uids) + def main(args=None): track_status(**vars(_parse_args(args))) + if __name__ == '__main__': main() |