def save_and_close_attributes(self):
        '''
        Performs the same function as save_attributes but also closes
        the attribute file.
        '''
        if not self.saveable():
            raise AttributeError("Cannot save attribute file without a valid file")
        if not self._db_closed:
            self._db_closed = True
            if not self._read_only:
                self.save_attributes()
            self._fd.close()
def save_and_close_attributes ( self ) : if not self . saveable ( ) : raise AttributeError ( "Cannot save attribute file without a valid file" ) if not self . _db_closed : self . _db_closed = True if not self . _read_only : self . save_attributes ( ) self . _fd . close ( )
Performs the same function as save_attributes but also closes
        the attribute file.