Make woodchuck upcalls future proof.
authorNeal H. Walfield <neal@walfield.org>
Thu, 20 Oct 2011 19:47:01 +0000 (21:47 +0200)
committerNeal H. Walfield <neal@walfield.org>
Thu, 20 Oct 2011 19:47:01 +0000 (21:47 +0200)
 - Add *args and **kwargs to the callback functions' parameters.

src/wc.py

index c8fd987..26f3432 100644 (file)
--- a/src/wc.py
+++ b/src/wc.py
@@ -58,7 +58,7 @@ class mywoodchuck (PyWoodchuck):
         return False
 
     # Woodchuck upcalls.
-    def stream_update_cb(self, stream):
+    def stream_update_cb(self, stream, *args, **kwargs):
         logger.debug("stream update called on %s (%s)"
                      % (stream.human_readable_name, stream.identifier,))
 
@@ -71,10 +71,11 @@ class mywoodchuck (PyWoodchuck):
                          % (stream.identifier, traceback.format_exc ()))
 
     def object_transfer_cb(self, stream, object,
-                           version, filename, quality):
         log ("object transfer called on %s (%s) in stream %s (%s)"
              % (object.human_readable_name, object.identifier,
                 stream.human_readable_name, stream.identifier))
+                           version, filename, quality,
+                           *args, **kwargs):
 
 _w = None
 def wc_init(listing, request_feedback=False):