Check path, but don't let exceptions raise
(path)
| 54 | #----------------------------------------------------------------------------- |
| 55 | |
| 56 | def _safe_exists(path): |
| 57 | """Check path, but don't let exceptions raise""" |
| 58 | try: |
| 59 | return os.path.exists(path) |
| 60 | except Exception: |
| 61 | return False |
| 62 | |
| 63 | |
| 64 | def _display_mimetype(mimetype, objs, raw=False, metadata=None): |