File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,11 @@ def uwsgi_handle_fork() -> None:
4444 logger .debug (
4545 f"uWSGI --master={ opt_master } --lazy-apps={ opt_lazy_apps } : postfork hooks not applied"
4646 )
47+
4748except ImportError :
4849 logger .debug (
4950 "uwsgi hooks: decorators not available: likely not running under uWSGI"
5051 )
51- pass
52+
53+ except AttributeError :
54+ logger .debug ("uwsgi hooks: Running under uWSGI but decorators not available" )
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def determine_service_name() -> str:
135135 uwsgi_type = "uWSGI worker%s"
136136
137137 app_name = uwsgi_type % app_name
138- except ImportError :
138+ except ( ImportError , AttributeError ) :
139139 pass
140140 except Exception :
141141 logger .debug ("non-fatal get_application_name: " , exc_info = True )
You can’t perform that action at this time.
0 commit comments