Browse Source

Remove unnecessary key attribute of sources.

tags/v0.2
Ben Kurtovic 10 years ago
parent
commit
f8f4669460
2 changed files with 2 additions and 3 deletions
  1. +1
    -2
      earwigbot/wiki/copyvios/result.py
  2. +1
    -1
      earwigbot/wiki/copyvios/workers.py

+ 1
- 2
earwigbot/wiki/copyvios/result.py View File

@@ -42,10 +42,9 @@ class CopyvioSource(object):
- :py:attr:`skipped`: whether this URL was skipped during the check - :py:attr:`skipped`: whether this URL was skipped during the check
""" """


def __init__(self, workspace, url, key, headers=None, timeout=5):
def __init__(self, workspace, url, headers=None, timeout=5):
self.workspace = workspace self.workspace = workspace
self.url = url self.url = url
self.key = key
self.headers = headers self.headers = headers
self.timeout = timeout self.timeout = timeout
self.confidence = 0.0 self.confidence = 0.0


+ 1
- 1
earwigbot/wiki/copyvios/workers.py View File

@@ -323,7 +323,7 @@ class CopyvioWorkspace(object):
from urlparse import urlparse from urlparse import urlparse
key = u".".join(urlparse(url).netloc.split(".")[-2:]) key = u".".join(urlparse(url).netloc.split(".")[-2:])


source = CopyvioSource(url=url, key=key, **self._source_args)
source = CopyvioSource(url=url, **self._source_args)
self.sources.append(source) self.sources.append(source)
logmsg = u"enqueue(): {0} {1} -> {2}" logmsg = u"enqueue(): {0} {1} -> {2}"
if key in self._queues.sites: if key in self._queues.sites:


Loading…
Cancel
Save