You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/20 23:43:58 UTC

[GitHub] [beam] KevinGG commented on a change in pull request #12641: [BEAM-10764] Make is_in_ipython robust

KevinGG commented on a change in pull request #12641:
URL: https://github.com/apache/beam/pull/12641#discussion_r474330117



##########
File path: sdks/python/apache_beam/utils/interactive_utils.py
##########
@@ -34,6 +38,11 @@ def is_in_ipython():
       is_in_ipython = True
   except ImportError:
     pass  # If dependencies are not available, then not interactive for sure.
+  except (KeyboardInterrupt, SystemExit):
+    raise
+  except:  # pylint: disable=bare-except
+    _LOGGER.info(
+        'Unexpected error occurred, treated as not in IPython.', exc_info=True)

Review comment:
       Added explicit return statement at each return point.




----------------------------------------------------------------
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:
users@infra.apache.org