Browse Source

[FIX] remove dangerous call to 'eval' function;

pull/99/head
Sylvain LE GAL 10 years ago
parent
commit
17eb1f2b34
  1. 7
      sentry_logger/__init__.py
  2. 4
      sentry_logger/__openerp__.py

7
sentry_logger/__init__.py

@ -42,11 +42,10 @@ try:
cgitb.enable()
# Get DSN info from config file or ~/.openerp_serverrc (recommended)
dsn = config.get('sentry_dsn')
level = config.get('sentry_logging_level')
if not level:
try:
level = getattr(logging, config.get('sentry_logging_level'))
except (AttributeError, TypeError):
level = _DEFAULT_LOGGING_LEVEL
else:
level = eval(level)
# Create Client
client = OdooClient(
dsn=dsn,

4
sentry_logger/__openerp__.py

@ -37,8 +37,8 @@ You have to add extra parameters in your odoo config file (~/.openerp_serverrc)
sentry_dsn = sync+<Your Sentry DSN>
* optional parameters:
* Define the level of log sent to sentry:
sentry_logging_level = logging.WARNING
(by default logging.ERROR)
sentry_logging_level = WARNING
(by default ERROR)
Optional Dependencies
---------------------

Loading…
Cancel
Save