Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
a2f81217
Commit
a2f81217
authored
3 years ago
by
Bastien Abadie
Browse files
Options
Downloads
Plain Diff
Merge branch 'sentry-shell' into 'master'
Do not report errors to Sentry in Django shells Closes
#759
See merge request
!1389
parents
0495d4cb
ea8d6bf6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1389
Do not report errors to Sentry in Django shells
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/project/settings.py
+4
-1
4 additions, 1 deletion
arkindex/project/settings.py
with
4 additions
and
1 deletion
arkindex/project/settings.py
+
4
−
1
View file @
a2f81217
...
...
@@ -27,6 +27,9 @@ BASE_DIR = Path(_base_dir) if _base_dir else Path(__file__).resolve().parent.par
# Used for special cases during configuration parsing and settings loading
TEST_ENV
=
'
test
'
in
sys
.
argv
# Matches ./manage.py shell[_plus] and arkindex shell[_plus] to disable Sentry reporting
DJANGO_SHELL
=
sys
.
argv
[
1
]
in
(
'
shell
'
,
'
shell_plus
'
)
CONFIG_PATH
=
Path
(
os
.
environ
.
get
(
'
CONFIG_PATH
'
,
BASE_DIR
/
'
config.yml
'
))
parser
=
get_settings_parser
(
BASE_DIR
)
conf
=
parser
.
parse
(
CONFIG_PATH
,
exist_ok
=
True
)
...
...
@@ -613,7 +616,7 @@ try:
except
ImportError
:
pass
if
SENTRY_DSN
:
if
SENTRY_DSN
and
not
DJANGO_SHELL
:
import
sentry_sdk
from
sentry_sdk.integrations.django
import
DjangoIntegration
from
sentry_sdk.integrations.logging
import
ignore_logger
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment