Comment 4 for bug 188298

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

I added a branch where the user can choose wether he/she wants to use edge or not.

Example:
In [1]: import launchpadbugs.connector as Connector

In [2]: Bug = Connector.ConnectBug(method="html")

In [3]: b = Bug(123456)

In [4]: b.url
Out[4]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [5]: from launchpadbugs.lpconstants import HTTPCONNECTION

In [6]: Bug.set_connection_mode(HTTPCONNECTION.MODE.EDGE)

In [7]: b = Bug(123456)

In [8]: b.url
Out[8]: 'https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [9]: Bug.set_connection_mode(HTTPCONNECTION.MODE.STABLE)

In [10]: b = Bug(url="https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456")

In [11]: b.url
Out[11]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [12]: Bug.authentication = "/home/markus/.gnome2/epiphany/mozilla/epiphany/cookies.txt"

In [13]: Bug.set_connection_mode(HTTPCONNECTION.MODE.DEFAULT)

In [14]: b = Bug(123456)

In [15]: b.url
Out[15]: 'https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [16]: Bug.set_connection_mode(HTTPCONNECTION.MODE.STABLE)

In [17]: b = Bug(123456)

In [18]: b.url
Out[18]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [19]:

So even if the user is member of "LP beta testers" the stable version of lp can be used with py-lp-bugs.
This would allow the scripts be more independent from the (frequent) changes to edge

Please test this, if this works this should land into .main as soon as possible.

Markus