Skip to content

Commit 6b04c25

Browse files
authored
prepare 6.0.1 release (#85)
1 parent 4e695d2 commit 6b04c25

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ldclient/event_summarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def summarize_event(self, event):
1818
counter_key = (event['key'], event['variation'], event['version'])
1919
counter_val = self.counters.get(counter_key)
2020
if counter_val is None:
21-
counter_val = { 'count': 1, 'value': event['value'], 'default': event['default'] }
21+
counter_val = { 'count': 1, 'value': event['value'], 'default': event.get('default') }
2222
self.counters[counter_key] = counter_val
2323
else:
2424
counter_val['count'] = counter_val['count'] + 1

ldclient/util.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ def check_uwsgi():
4848
# noinspection PyPackageRequirements,PyUnresolvedReferences
4949
import uwsgi
5050

51-
if not uwsgi.opt.get('enable-threads'):
52-
log.error('The LaunchDarkly client requires the enable-threads option be passed to uWSGI. '
53-
'To learn more, see http://docs.launchdarkly.com/v1.0/docs/python-sdk-reference#configuring-uwsgi')
51+
if uwsgi.opt.get('enable-threads'):
52+
return
53+
if uwsgi.opt.get('threads') is not None and int(uwsgi.opt.get('threads')) > 1:
54+
return
55+
log.error("The LaunchDarkly client requires the 'enable-threads' or 'threads' option be passed to uWSGI. "
56+
'To learn more, see http://docs.launchdarkly.com/v1.0/docs/python-sdk-reference#configuring-uwsgi')
5457

5558

5659
class Event(object):

0 commit comments

Comments
 (0)