Skip to content

Commit c7b0f13

Browse files
Benjamin Sergeantmattrobenolt
authored andcommitted
TypeError Exception in sentry.runner.settings.get_sentry_conf()
If click.get_current_context() returns None, trying to access ctx.object['config'] yields a TypeError. This happens when trying to write a sentry command in a separate module from sentry, when calling sentry.runner.settings.configure()
1 parent a61a537 commit c7b0f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sentry/runner/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def get_sentry_conf():
5252
try:
5353
ctx = click.get_current_context()
5454
return ctx.obj['config']
55-
except (RuntimeError, KeyError):
55+
except (RuntimeError, KeyError, TypeError):
5656
try:
5757
return os.environ['SENTRY_CONF']
5858
except KeyError:

0 commit comments

Comments
 (0)