def set_owner(self, newowner): super(TestBed, self).set_owner(newowner) try: for device in self._items.values(): giveto(device, newowner) except: self.disown() raise
def give(self, argv): """give <object> Give this user an object.""" obj = self._get_object(argv[1]) if obj: netobjects.giveto(obj, self._obj)
def giveto(self, argv): """giveto <user> Gives ownership of this object to the given user.""" user = self._get_object(argv[1]) if user: netobjects.giveto(self._obj, user)