'update an access_mode'

def update_access_mode(self, inc_mode):

    try:
        index = self.access_modes.index(inc_mode)
    except ValueError as _:
        return self.add_access_mode(inc_mode)
    self.access_modes[index] = inc_mode
    return True
