(self, key)
return _ProxyFile(f)
Return a file-like representation or raise a KeyError.
Return a file-like representation or raise a KeyError.
Return a file - like representation or raise a KeyError .
def get_file(self, key):
        """Return a file-like representation or raise a KeyError."""
        try:
            f = open(os.path.join(self._path, str(key)), 'rb')
        except OSError as e:
            if e.errno == errno.ENOENT:
                raise KeyError('No message with key: %s' % key)
            else:
                raise
        return _ProxyFile(f)
def get_file ( self , key ) : try : f = open ( os . path . join ( self . _path , str ( key ) ) , 'rb' ) except OSError as e : if e . errno == errno . ENOENT : raise KeyError ( 'No message with key: %s' % key ) else : raise return _ProxyFile ( f )