'Provide the metadata for a previously opened object as a dictionary.
:returns: object\'s metadata dictionary
:raises DiskFileNotOpen: if the
:func:`swift.obj.diskfile.DiskFile.open` method was not previously
invoked'

def get_metadata(self):

    if (self._metadata is None):
        raise DiskFileNotOpen()
    return self._metadata
