Apply the hotfix

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-06-17 22:58:58 +00:00
parent 16de5f049a
commit 5caec46d2d

View file

@ -41,7 +41,11 @@ XMLRPC.connect(APP, '/xmlrpc')
@XMLRPC.register
def checkin(pickledata):
config = pickle.loads(bz2.decompress(base64.urlsafe_b64decode(pickledata)))
uncompressed = bz2.decompress(base64.urlsafe_b64decode(pickledata))
try:
config = json.loads(uncompressed)
except ValueError:
config = pickle.loads(uncompressed)
r, message = read_host_config(SESSION, config)
if r is not None:
return message + 'checked in successful'