Skip to content

Commit

Permalink
Merge pull request apache#2150 from artwr/artwr-fix_another_use_of_eval
Browse files Browse the repository at this point in the history
  • Loading branch information
artwr committed Mar 14, 2017
2 parents ed03bb7 + 2bf52ab commit c44e200
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from past.builtins import basestring, unicode

import ast
import os
import pkg_resources
import socket
Expand Down Expand Up @@ -44,7 +45,6 @@
import jinja2
import markdown
import nvd3
import ast

from wtforms import (
Form, SelectField, TextAreaField, PasswordField, StringField, validators)
Expand Down Expand Up @@ -231,8 +231,8 @@ def data_profiling_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if (
current_app.config['LOGIN_DISABLED'] or
(not current_user.is_anonymous() and current_user.data_profiling())
current_app.config['LOGIN_DISABLED'] or
(not current_user.is_anonymous() and current_user.data_profiling())
):
return f(*args, **kwargs)
else:
Expand Down Expand Up @@ -312,7 +312,7 @@ def chart_data(self):

# Processing templated fields
try:
args = eval(chart.default_params)
args = ast.literal_eval(chart.default_params)
if type(args) is not type(dict()):
raise AirflowException('Not a dict')
except:
Expand Down

0 comments on commit c44e200

Please sign in to comment.