Commit 72b31104 authored by Rafael Monnerat's avatar Rafael Monnerat

Make sure string are encoded when passed to xml_marshaller

parent 25e288cf
...@@ -270,7 +270,7 @@ def supplySupply(): ...@@ -270,7 +270,7 @@ def supplySupply():
@app.route('/requestComputerPartition', methods=['POST']) @app.route('/requestComputerPartition', methods=['POST'])
def requestComputerPartition(): def requestComputerPartition():
shared_xml = request.form.get('shared_xml') shared_xml = request.form.get('shared_xml')
share = xml_marshaller.xml_marshaller.loads(shared_xml) share = xml_marshaller.xml_marshaller.loads(shared_xml.encode())
if not share: if not share:
return request_not_shared() return request_not_shared()
else: else:
...@@ -294,7 +294,7 @@ def request_not_shared(): ...@@ -294,7 +294,7 @@ def request_not_shared():
partition_reference = request.form.get('partition_reference', '').encode() partition_reference = request.form.get('partition_reference', '').encode()
partition_id = request.form.get('computer_partition_id', '').encode() partition_id = request.form.get('computer_partition_id', '').encode()
partition_parameter_kw = request.form.get('partition_parameter_xml', None) partition_parameter_kw = request.form.get('partition_parameter_xml', None)
requested_state = xml_marshaller.xml_marshaller.loads(request.form.get('state')) requested_state = xml_marshaller.xml_marshaller.loads(request.form.get('state').encode())
if partition_parameter_kw: if partition_parameter_kw:
partition_parameter_kw = xml_marshaller.xml_marshaller.loads( partition_parameter_kw = xml_marshaller.xml_marshaller.loads(
partition_parameter_kw.encode()) partition_parameter_kw.encode())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment