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/mutual_friends.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/mutual_friends.py')
-rw-r--r-- | bin/mutual_friends.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/mutual_friends.py b/bin/mutual_friends.py index 3b0576f..1d231b0 100644 --- a/bin/mutual_friends.py +++ b/bin/mutual_friends.py @@ -32,7 +32,7 @@ class OutputSinkMutualFriends(metaclass=abc.ABCMeta): class OutputSinkCSV(OutputSinkMutualFriends): def __init__(self, fd=sys.stdout): - self._writer = output.OutputWriterCSV(fd) + self._writer = output.FileWriterCSV(fd) def write_mutual_friends(self, friend_list): for user in friend_list: @@ -40,7 +40,7 @@ class OutputSinkCSV(OutputSinkMutualFriends): class OutputSinkJSON(OutputSinkMutualFriends): def __init__(self, fd=sys.stdout): - self._writer = output.OutputWriterJSON(fd) + self._writer = output.FileWriterJSON(fd) def write_mutual_friends(self, friend_list): self._writer.write(friend_list) @@ -54,7 +54,7 @@ class OutputFormat(Enum): @staticmethod def open_file(path=None): - return output.open_text_file(path) + return output.open_output_text_file(path) def create_sink(self, fd=sys.stdout): if self is OutputFormat.CSV: |