You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-urlgrabber/urlgrabber-file-checkfunc.p...

17 lines
745 B

--- foo/urlgrabber/grabber.py~ 2009-03-09 12:01:21.000000000 -0400
+++ foo/urlgrabber/grabber.py 2009-03-09 12:01:21.000000000 -0400
@@ -913,6 +913,13 @@
raise URLGrabError(3,
_('Not a normal file: %s') % (path, ))
elif not opts.range:
+ if not opts.checkfunc is None:
+ cb_func, cb_args, cb_kwargs = \
+ self._make_callback(opts.checkfunc)
+ obj = CallbackObject()
+ obj.filename = path
+ obj.url = url
+ apply(cb_func, (obj, )+cb_args, cb_kwargs)
return path
def retryfunc(opts, url, filename):