TypeError calling sharing service getPillarGranteeData
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Critical
|
Unassigned |
Bug Description
This example of API
service = lp.load(
service.
Raise a TypeError error because wadllib resource.url returned a URI instead a string
Traceback (most recent call last):
File "./share-
sys.
File "./share-
migrator.
File "./share-
self.
File "./share-
grantees = self.service.
File "/usr/lib/
url = self.wadl_
File "/usr/lib/
return self.request.
File "/usr/lib/
if '?' in url:
TypeError: argument of type 'URI' is not iterable
This is the hack in my script to allow me to use this method: url(self, param_values=None, **kw_param_values):
# Every normal man must be tempted at times to spit on his hands,
# hoist the black flag, and begin to slit throats.
def safe_build_
"""Return the request URL to use to invoke this method.
The unsafe method raises an error for load('/ +services/ sharing' ) values = self.validate_ param_values(
self.query_ params, param_values, **kw_param_values) resource. url) values) > 0: validated_ values)
lp.
because the wadl resource.uri it gets a URI instead of a str.
"""
try:
from urllib.parse import urlencode
urlencode
except ImportError:
from urllib import urlencode
validated_
url = str(self.
if len(validated_
if '?' in url:
append = '&'
else:
append = '?'
url += append + urlencode(
return url