aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/online_sessions.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-28 02:40:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-28 02:40:27 +0300
commit1c0e2c13d4f0acbe42e43d886df4f1067506efed (patch)
tree8d76116d718293275315605b66f1466af7d09c27 /bin/online_sessions.py
parentbin: move file i/o to a separate module (diff)
downloadvk-scripts-1c0e2c13d4f0acbe42e43d886df4f1067506efed.tar.gz
vk-scripts-1c0e2c13d4f0acbe42e43d886df4f1067506efed.zip
vk: move file i/o to a separate module
Diffstat (limited to 'bin/online_sessions.py')
-rw-r--r--bin/online_sessions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/online_sessions.py b/bin/online_sessions.py
index cb3f4bf..be3a4f2 100644
--- a/bin/online_sessions.py
+++ b/bin/online_sessions.py
@@ -335,7 +335,8 @@ def process_online_sessions(
if time_from > time_to:
time_from, time_to = time_to, time_from
- with db_fmt.create_reader(db_path) as db_reader:
+ with db_fmt.open_input_file(db_path) as db_fd:
+ db_reader = db_fmt.create_reader(db_fd)
with out_fmt.open_file(out_path) as out_fd:
out_sink = out_fmt.create_sink(out_fd)
out_sink.process_database(