parameters: (self, key)
docstring: Use TOC to return subpath for given key, or raise a KeyError.
docstring_summary: Use TOC to return subpath for given key, or raise a KeyError.
docstring_tokens: Use TOC to return subpath for given key or raise a KeyError .
function: 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)
function_tokens: 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 )