1
# Author: Robert Collins <robert.collins@canonical.com>
3
# Copyright 2010 Canonical Ltd.
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License along
15
# with this program. If not, see <http://www.gnu.org/licenses/>.
21
"""Wrapper class for launchpadlib with tweaks."""
23
from launchpadlib.launchpad import Launchpad as UpstreamLaunchpad
25
class Launchpad(UpstreamLaunchpad):
26
"""Launchpad object with bugfixes."""
28
def load(self, url_string):
31
Extended to support url_string being a relative url.
33
Needed until bug 524775 is fixed.
35
if not url_string.startswith('https:'):
36
return UpstreamLaunchpad.load(self, str(self._root_uri) + url_string)
38
return UpstreamLaunchpad.load(self, url_string)