aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/db/backend/csv.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-26 22:33:34 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-26 22:33:34 +0300
commitdb723bbd4832c9901363586f08543e43ef7ffa4e (patch)
tree216079e25c13685b8cd0279d705ccca274771567 /vk/tracking/db/backend/csv.py
parentREADME update (diff)
downloadvk-scripts-db723bbd4832c9901363586f08543e43ef7ffa4e.tar.gz
vk-scripts-db723bbd4832c9901363586f08543e43ef7ffa4e.zip
refactoring
Context managers everywhere!
Diffstat (limited to 'vk/tracking/db/backend/csv.py')
-rw-r--r--vk/tracking/db/backend/csv.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/vk/tracking/db/backend/csv.py b/vk/tracking/db/backend/csv.py
index f20c617..e607774 100644
--- a/vk/tracking/db/backend/csv.py
+++ b/vk/tracking/db/backend/csv.py
@@ -14,12 +14,6 @@ class Writer:
self._fd = fd
self._writer = csv.writer(fd, lineterminator='\n')
- def __enter__(self):
- return self
-
- def __exit__(self, *args):
- pass
-
def on_initial_status(self, user):
self._write_record(user)
self._fd.flush()
@@ -47,12 +41,6 @@ class Reader(Iterable):
def __init__(self, fd):
self._reader = csv.reader(fd)
- def __enter__(self):
- return self
-
- def __exit__(self, *args):
- pass
-
def __iter__(self):
return map(Reader._record_from_row, self._reader)