diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-28 03:19:25 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-28 03:19:25 +0300 |
commit | e49227975fd10e9f130f46116f905351c17167c4 (patch) | |
tree | c2b5f75a5e6a7ec5dbf4eaf080f46a96e3e29ac0 /bin/online_sessions.py | |
parent | add abstract classes for db readers/writers (diff) | |
download | vk-scripts-e49227975fd10e9f130f46116f905351c17167c4.tar.gz vk-scripts-e49227975fd10e9f130f46116f905351c17167c4.zip |
refactoring
Diffstat (limited to 'bin/online_sessions.py')
-rw-r--r-- | bin/online_sessions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/online_sessions.py b/bin/online_sessions.py index be3a4f2..f5707c0 100644 --- a/bin/online_sessions.py +++ b/bin/online_sessions.py @@ -70,7 +70,7 @@ class OutputConverterCSV: class OutputSinkCSV(OutputSinkOnlineSessions): def __init__(self, fd=sys.stdout): - self._writer = output.OutputWriterCSV(fd) + self._writer = output.FileWriterCSV(fd) _CONVERT_KEY = { GroupBy.USER: OutputConverterCSV.convert_user, @@ -127,7 +127,7 @@ class OutputConverterJSON: class OutputSinkJSON(OutputSinkOnlineSessions): def __init__(self, fd=sys.stdout): - self._writer = output.OutputWriterJSON(fd) + self._writer = output.FileWriterJSON(fd) _DURATION_FIELD = 'duration' @@ -257,9 +257,9 @@ class OutputFormat(Enum): def open_file(self, path=None): if self is OutputFormat.PLOT: - return output.open_binary_file(path) + return output.open_output_binary_file(path) else: - return output.open_text_file(path) + return output.open_output_text_file(path) def _parse_group_by(s): try: |