Skip to content

Commit fc7d4cb

Browse files
alanjdsbasepi
andauthored
Support uwsgi installed but not being used (#836)
The `ImportError` will be raised if `uwsgi` package is not installed. But if installed yet not _in use_, like during a Django's `./manage.py runserver` or on tests, the raised error will be AttributeError over uwsgi.masterpid . Co-authored-by: Colton Myers <colton.myers@gmail.com>
1 parent fdb27d6 commit fc7d4cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticapm/utils/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def postfork(f):
183183
return f
184184

185185

186-
except ImportError:
186+
except (ImportError, AttributeError):
187187

188188
def postfork(f):
189189
return f

0 commit comments

Comments
 (0)