checker: make the log() function of SimpleCHKFileVerifier compatible with the log() function of its superclasses and subclasses

This commit is contained in:
Zooko O'Whielacronx 2008-08-25 14:44:07 -07:00
parent 72268f2bfe
commit def9fc8cf0

View File

@ -243,12 +243,12 @@ class SimpleCHKFileVerifier(download.FileDownloader):
num = self._client.log("SimpleCHKFileVerifier(%s): starting" % prefix)
self._log_number = num
def log(self, msg, parent=None):
if parent is None:
parent = self._log_number
def log(self, msg, *args, **kwargs):
if not kwargs.get('parent'):
kwargs['parent'] = self._log_number
return self._client.log("SimpleCHKFileVerifier(%s): %s"
% (self._log_prefix, msg),
parent=parent)
*args, **kwargs)
def start(self):