MCPcopy Create free account
hub / github.com/ipython/ipython / _safe_exists

Function _safe_exists

IPython/core/display.py:34–39  ·  view source on GitHub ↗

Check path, but don't let exceptions raise

(path)

Source from the content-addressed store, hash-verified

32#-----------------------------------------------------------------------------
33
34def _safe_exists(path):
35 """Check path, but don't let exceptions raise"""
36 try:
37 return os.path.exists(path)
38 except Exception:
39 return False
40
41def _merge(d1, d2):
42 """Like update, but merges sub-dicts instead of clobbering at the top level.

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected