Skip to content

Commit b0100cc

Browse files
committed
fix uwsgi error with AUTOWRAPT_BOOTSTRAP
Signed-off-by: Varsha GS <[email protected]>
1 parent 2d878ad commit b0100cc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/instana/hooks/hook_uwsgi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
4748
except 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")

src/instana/util/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)