Skip to content

Commit

Permalink
Made lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishav Chakraborty committed Nov 27, 2018
1 parent 84d54cc commit 0f7b1ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions core/controllers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,16 +419,17 @@ def _render_exception_json_or_html(self, return_type, values):

method = self.request.environ['REQUEST_METHOD']

if(return_type == feconf.HANDLER_TYPE_HTML and
method == 'GET'):
if return_type == feconf.HANDLER_TYPE_HTML and (
method == 'GET'):
self.values.update(values)
if 'iframed' in self.values and self.values['iframed']:
self.render_template(
'pages/error/error_iframed.html', iframe_restriction=None)
else:
self.render_template('pages/error/error.html')
else:
if return_type != feconf.HANDLER_TYPE_JSON:
if return_type != feconf.HANDLER_TYPE_JSON and (
return_type != feconf.HANDLER_TYPE_DOWNLOADABLE):
logging.warning('Not a recognized return type: '
'defaulting to render JSON.')
self.render_json(values)
Expand Down
3 changes: 1 addition & 2 deletions core/controllers/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ def get(self):
"""Handles GET requests."""
file_contents = 'example'
self.render_downloadable_file(
file_contents, 'example.pdf',
'text/plain')
file_contents, 'example.pdf', 'text/plain')

def setUp(self):
super(RenderDownloadableTest, self).setUp()
Expand Down

0 comments on commit 0f7b1ff

Please sign in to comment.