aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-21 00:49:15 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-21 00:49:15 +0300
commit59f344f5518990c04db085bbd3875bc10fb6133e (patch)
treec6ab2f54decfb5d2f50f58913b777e88a1709525 /bin
parentbugfix & allow skipping deactivated users (diff)
downloadvk-scripts-59f344f5518990c04db085bbd3875bc10fb6133e.tar.gz
vk-scripts-59f344f5518990c04db085bbd3875bc10fb6133e.zip
mutual_friends.py: refactoring
Diffstat (limited to 'bin')
-rw-r--r--bin/mutual_friends.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/mutual_friends.py b/bin/mutual_friends.py
index 07e1d95..c0d8ffc 100644
--- a/bin/mutual_friends.py
+++ b/bin/mutual_friends.py
@@ -41,18 +41,18 @@ class OutputWriterCSV:
class OutputWriterJSON:
def __init__(self, fd=sys.stdout):
self._fd = fd
- self._array = []
+ self._arr = []
def __enter__(self):
return self
def __exit__(self, *args):
- self._fd.write(json.dumps(self._array, indent=3, ensure_ascii=False))
+ self._fd.write(json.dumps(self._arr, indent=3, ensure_ascii=False))
self._fd.write('\n')
def write_mutual_friends(self, friend_list):
for user in friend_list:
- self._array.append(_filter_user_fields(user))
+ self._arr.append(_filter_user_fields(user))
class OutputFormat(Enum):
CSV = 'csv'