Public bug reported:
On my machine (Ubuntu 12.04 with enablement stack) I could trace the
error
oneconf.networksync:Invalid package data from server
This comes from:
/usr/lib/python2.7/dist-packages/oneconf/networksync
starting in line 89
def list_packages(self, machine_uuid):
"""List all packages for that machine"""
package_list = self._get('packages/%s/' % machine_uuid,
scheme=AUTHENTICATED_API_SCHEME)
if not package_list:
raise APIError('Package list empty')
# FIXME: need to do this hack to transform the http request to a json
format content
try:
package_list = json.loads(package_list[1:-1].replace("'",
'"').replace("True", "true").replace("False", 'false'))
except ValueError, e:
raise APIError('Package list invalid: %s' % e)
return package_list
The #FIXME is not enough, because the server delivers a kind of unicode string.
json.loads(package_list[1:-1].replace("u'", "'").replace("'",
'"').replace("True", "true").replace("False", 'false')
does it for me
the updated file is added, but its not a proper patch
** Affects: oneconf (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "infraclient_pristine.py"
https://bugs.launchpad.net/bugs/1311486/+attachment/4093751/+files/infraclient_pristine.py
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to oneconf in Ubuntu.
https://bugs.launchpad.net/bugs/1311486
Title:
oneconf does not sync: "Invalid Package data from Server"
Status in “oneconf” package in Ubuntu:
New
Bug description:
On my machine (Ubuntu 12.04 with enablement stack) I could trace the
error
oneconf.networksync:Invalid package data from server
This comes from:
/usr/lib/python2.7/dist-packages/oneconf/networksync
starting in line 89
def list_packages(self, machine_uuid):
"""List all packages for that machine"""
package_list = self._get('packages/%s/' % machine_uuid,
scheme=AUTHENTICATED_API_SCHEME)
if not package_list:
raise APIError('Package list empty')
# FIXME: need to do this hack to transform the http request to a json
format content
try:
package_list = json.loads(package_list[1:-1].replace("'",
'"').replace("True", "true").replace("False", 'false'))
except ValueError, e:
raise APIError('Package list invalid: %s' % e)
return package_list
The #FIXME is not enough, because the server delivers a kind of unicode
string.
json.loads(package_list[1:-1].replace("u'", "'").replace("'",
'"').replace("True", "true").replace("False", 'false')
does it for me
the updated file is added, but its not a proper patch
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/oneconf/+bug/1311486/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp