Code cleanup.

This commit is contained in:
Bastian Kleineidam 2013-02-18 20:02:16 +01:00
parent c4191158ec
commit 4f03963b9e
2 changed files with 3 additions and 3 deletions

View file

@ -57,6 +57,7 @@ class _BasicScraper(object):
self.indexes = tuple()
def __cmp__(self, other):
"""Compare scraper by name and index list."""
if not isinstance(other, _BasicScraper):
return 1
# first, order by name
@ -67,6 +68,7 @@ class _BasicScraper(object):
return cmp(self.indexes, other.indexes)
def __hash__(self):
"""Get hash value from name and index list."""
return hash((self.get_name(), self.indexes))
def getCurrentStrips(self):

View file

@ -245,9 +245,7 @@ def handle_url(url, session, res):
print("ERROR matching activity:", repr(data[end:end+300]), file=sys.stderr)
continue
active = mo.group(1).lower() == "active"
res[name] = [
comicurl, desc, num, genre, active
]
res[name] = [comicurl, desc, num, genre, active]
if not res:
print("ERROR:", "did not match any comics", file=sys.stderr)