Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
0d9df68e
Commit
0d9df68e
authored
May 24, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #113 from edx/clintonb/mysql-warnings
Handling MySQL warnings as exceptions
parents
eb64601c
7e6dfa93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
course_discovery/settings/production.py
+6
-0
No files found.
course_discovery/settings/production.py
View file @
0d9df68e
import
platform
import
sys
import
warnings
from
logging.handlers
import
SysLogHandler
from
os
import
environ
import
certifi
import
MySQLdb
import
yaml
from
course_discovery.settings.base
import
*
...
...
@@ -72,3 +74,7 @@ HAYSTACK_CONNECTIONS['default'].update({
for
override
,
value
in
DB_OVERRIDES
.
items
():
DATABASES
[
'default'
][
override
]
=
value
# NOTE (CCB): Treat all MySQL warnings as exceptions. This is especially
# desired for truncation warnings, which hide potential data integrity issues.
warnings
.
filterwarnings
(
'error'
,
category
=
MySQLdb
.
Warning
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment