summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2016-06-17 22:58:58 +0000
committerPatrick Uiterwijk <puiterwijk@redhat.com>2016-06-17 22:58:58 +0000
commit5caec46d2da057319be190782b03f82fbf23d028 (patch)
tree9052c32a825584dd38b16c866a06044a2dc3db51
parent16de5f049a6bed0b4d26fbf42d67a678871937bb (diff)
downloadansible-5caec46d2da057319be190782b03f82fbf23d028.tar.gz
ansible-5caec46d2da057319be190782b03f82fbf23d028.tar.xz
ansible-5caec46d2da057319be190782b03f82fbf23d028.zip
Apply the hotfix
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
-rw-r--r--roles/mirrormanager/frontend2/files/xmlrpc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/mirrormanager/frontend2/files/xmlrpc.py b/roles/mirrormanager/frontend2/files/xmlrpc.py
index 804f43afc..e75d479e7 100644
--- a/roles/mirrormanager/frontend2/files/xmlrpc.py
+++ b/roles/mirrormanager/frontend2/files/xmlrpc.py
@@ -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'