def nextElement(self): if self.elements: return self.elements.pop(0) elif self.token: self.elements, self.token = self._getElements(self.token) return self.nextElement() raise NoSuchElementException()
def getValue(self, key): if key in self._value: return self._getValue(key) print( "KeyMap.getValue() Error: %s **************************************" % key) raise NoSuchElementException()
def removeByName(self, name): log.debug("removeByName called" + str(name)) uri = expandUri(name) if self.provCtx.isUrlInPackage(uri): self.provCtx.removePackageByUrl(uri) else: log.debug("removeByName unknown uri " + str(name) + ", ignoring") raise NoSuchElementException(uri + "is not in package", self) log.debug("removeByName called" + str(uri) + " successful")
def nextElement(self): if self.rows: return self.rows.pop(0) elif self.token: self.rows, self.token, self.sync, error = self._getRows(self.token) if not error: return self.nextElement() logMessage(self.ctx, SEVERE, error, "OAuth2Service","Enumerator()") raise NoSuchElementException()
def nextElement(self): if self.hasMoreElements(): response, self.error = self._getResponse() return response raise NoSuchElementException()
def nextElement(self): if self.next is not self.end: return self.next raise NoSuchElementException('no more elements exist', self)
def _getNoSuchElementException(self, code): e = NoSuchElementException() e.Message = getMessage(self.ctx, code) e.Context = self return e
def getByName(self, name): if not self.hasByName(name): raise NoSuchElementException() return self._typemap[name]
def setCurrentController(self, controller): if controller in self.controllers: self.controller = controller else: raise NoSuchElementException("controller not found", self)