Comment 1 for bug 239684

Revision history for this message
Markus Korn (thekorn) wrote :

this patch against .main r94 adds a basic hook-interface to py-lp-bugs.

This is an example on how to use this progress_hook:

In [1]: def example_hook(counter, block_size, size):
   ...: print (counter, block_size, size)
   ...:
   ...:

In [2]: from launchpadbugs.connector import ConnectBug

In [3]: Bug = ConnectBug()

In [4]: Bug.connection.set_progress_hook(example_hook)

In [5]: b = Bug(200500)
(1, 4096, 51781)
(2, 4096, 51781)
(3, 4096, 51781)
(4, 4096, 51781)
(5, 4096, 51781)
(6, 4096, 51781)
(7, 4096, 51781)
(8, 4096, 51781)
(9, 4096, 51781)
(10, 4096, 51781)
(11, 4096, 51781)
(12, 4096, 51781)
(13, 4096, 51781)

Please review this patch, it definitely needs some texting

Markus