anitakar commented on a change in pull request #7472: [AIRFLOW-6850] Handle no
access to code in UI
URL: https://github.com/apache/airflow/pull/7472#discussion_r381951179
##########
File path: airflow/www/views.py
##########
@@ -528,8 +528,9 @@ def code(self, session=None):
code = f.read()
html_code = highlight(
code, lexers.PythonLexer(), HtmlFormatter(linenos=True))
- except OSError as e:
- html_code = str(e)
+ except Exception as e:
Review comment:
Because with the test I got AttributeError None object doe not have dag_id.
This was me trying to patch it up.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services