'Read metadata from source object file. In case of failure, quarantine
the file.
Takes source and filename separately so we can read from an open
file if we have one.
:param source: file descriptor or filename to load the metadata from
:param quarantine_filename: full path of file to load the metadata from'

def _failsafe_read_metadata(self, source, quarantine_filename=None):

    try:
        return read_metadata(source)
    except (DiskFileXattrNotSupported, DiskFileNotExist):
        raise
    except Exception as err:
        raise self._quarantine(quarantine_filename, ('Exception    reading    metadata:    %s' % err))
