Skip to content

Commit 12662cb

Browse files
committed
cleanup for PR
1 parent 31229ea commit 12662cb

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

splitio/sync/split.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Splits synchronization logic."""
2-
from ast import Not
32
import logging
43
import re
54
import itertools
@@ -76,7 +75,6 @@ def _fetch_until(self, fetch_options, till=None, segment_sync=None):
7675

7776
for split in split_changes.get('splits', []):
7877
if split['status'] == splits.Status.ACTIVE.value:
79-
_LOGGER.debug('split details: '+str(split))
8078
self._split_storage.put(splits.from_raw(split))
8179
else:
8280
self._split_storage.remove(split['name'])

splitio/sync/synchronizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def synchronize_splits(self, till):
234234
_LOGGER.debug('Starting splits synchronization')
235235
try:
236236
segment_list = self._split_synchronizers.split_sync.synchronize_splits(till, self._split_synchronizers.segment_sync)
237-
if segment_list != []:
237+
if len(segment_list) != 0:
238238
success = self._split_synchronizers.segment_sync.synchronize_segments(segment_list)
239239
if not success:
240240
_LOGGER.error('Failed to sync segment.')

tests/sync/test_synchronizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def test_sync_all_ok(self, mocker):
248248
def sync_splits(*_):
249249
"""Sync Splits."""
250250
counts['splits'] += 1
251-
return True
251+
return []
252252

253253
def sync_segments(*_):
254254
"""Sync Segments."""
@@ -262,7 +262,7 @@ def sync_segments(*_):
262262

263263
synchronizer.sync_all()
264264
assert counts['splits'] == 1
265-
assert counts['segments'] == 2
265+
assert counts['segments'] == 1
266266

267267
def test_sync_all_split_attempts(self, mocker):
268268
"""Test that 3 attempts are done before failing."""

0 commit comments

Comments
 (0)