(self, key)
Use TOC to return subpath for given key, or raise a KeyError.
Use TOC to return subpath for given key, or raise a KeyError.
Use TOC to return subpath for given key or raise a KeyError .
def _lookup(self, key):
        """Use TOC to return subpath for given key, or raise a KeyError."""
        try:
            if os.path.exists(os.path.join(self._path, self._toc[key])):
                return self._toc[key]
        except KeyError:
            pass
        self._refresh()
        try:
            return self._toc[key]
        except KeyError:
            raise KeyError('No message with key: %s' % key) from None
def _lookup ( self , key ) : try : if os . path . exists ( os . path . join ( self . _path , self . _toc [ key ] ) ) : return self . _toc [ key ] except KeyError : pass self . _refresh ( ) try : return self . _toc [ key ] except KeyError : raise KeyError ( 'No message with key: %s' % key ) from None