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



##########
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:
       Optional: This is a case where an explicit `return False` (here and for 
the ImportError) might make things more clear.




----------------------------------------------------------------
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]


Reply via email to