def _read_metadata(self):
        md = {}
        #explicit str() is needed for python2, otherwise the type would be
        #unicode and then it won't work anymore
        dt = self._tiff.GetField(str("ImageDescription"))
        if dt is not None:
            try:
                md["ImageDescription"] = dt.decode()
            except:
                pass
        dt = self._tiff.GetField(str("DateTime"))
        if dt is not None:
            try:
                md["DateTime"] = _tiff_datetime(dt.decode())
            except:
                pass
        dt = self._tiff.GetField(str("Software"))
        if dt is not None:
            try:
                md["Software"] = dt.decode()
            except:
                pass
        dt = self._tiff.GetField(str("DocumentName"))
        if dt is not None:
            try:
                md["DocumentName"] = dt.decode()
            except:
                pass
        return md
A signal handler that will dump application info to the logs.
dataset/ETHPy150Open soft-matter/pims/pims/tiff_stack.py/TiffStack_libtiff._read_metadata--crossover with--dataset/ETHPy150Open box/ClusterRunner/app/util/unhandled_exception_handler.py/UnhandledExceptionHandler._application_info_dump_signal_handler