def removeKeywords(self, index): # Override since we need to delete our private data keys = self.getKeywords() if index < 0 or index >= len(keys): return keywords = keys[index].upper().lower().strip() filename = os.path.join(self.getStoragePath(), self.hashString(keywords) + '.json') if os.path.exists(filename): os.unlink(filename) if BaseService.removeKeywords(self, index): # Remove any extras extras = self.getExtras() if keywords in extras: del extras[keywords] self.setExtras(extras) return True else: return False
def removeKeywords(self, index): url = self.getKeywords()[index] result = BaseService.removeKeywords(self, index) if result and url in self.brokenUrls: self.brokenUrls.remove(url) return result