kaxil commented on a change in pull request #11526:
URL: https://github.com/apache/airflow/pull/11526#discussion_r510071759
##########
File path: setup.py
##########
@@ -34,9 +34,12 @@
# Kept manually in sync with airflow.__version__
spec = util.spec_from_file_location("airflow.version", os.path.join('airflow',
'version.py')) # noqa
-mod = util.module_from_spec(spec)
-spec.loader.exec_module(mod) # type: ignore
-version = mod.version # type: ignore
+try:
+ mod = util.module_from_spec(spec)
+ spec.loader.exec_module(mod) # type: ignore
+ version = mod.version # type: ignore
+except Exception: # pylint: disable=broad-except
+ version = None
Review comment:
Can you add a comment please in the line above try as why this
`try..except` block is needed
----------------------------------------------------------------
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]