Skip to content

Commit e6219c9

Browse files
authored
Fix check uwsgi options (#148)
1 parent 20ccf15 commit e6219c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ldclient/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ def check_uwsgi():
3434
if 'uwsgi' in sys.modules:
3535
# noinspection PyPackageRequirements,PyUnresolvedReferences
3636
import uwsgi
37+
if not hasattr(uwsgi, 'opt'):
38+
# means that we are not running under uwsgi
39+
return
3740

3841
if uwsgi.opt.get('enable-threads'):
3942
return
4043
if uwsgi.opt.get('threads') is not None and int(uwsgi.opt.get('threads')) > 1:
4144
return
4245
log.error("The LaunchDarkly client requires the 'enable-threads' or 'threads' option be passed to uWSGI. "
43-
'To learn more, see http://docs.launchdarkly.com/v1.0/docs/python-sdk-reference#configuring-uwsgi')
46+
'To learn more, see https://docs.launchdarkly.com/sdk/server-side/python#configuring-uwsgi')
4447

4548

4649
class Event:

0 commit comments

Comments
 (0)