Commit 952fe00d authored by Rafael Monnerat's avatar Rafael Monnerat

SlapTool: Don't decode SoftwareRelease()._software_release

Since the compatibility with python3 the code change to not encode the string anymore.

@jm @bminusl can you take a look if it is enough (I will improve commit message after)

This at least make the test pass.

/reviewed-on nexedi/slapos.core!94
parent 8f392e0a
...@@ -809,8 +809,6 @@ class SlapTool(BaseTool): ...@@ -809,8 +809,6 @@ class SlapTool(BaseTool):
slap_partition._software_release_document = SoftwareRelease( slap_partition._software_release_document = SoftwareRelease(
software_release=software_instance.getUrlString().decode("UTF-8"), software_release=software_instance.getUrlString().decode("UTF-8"),
computer_guid=computer_reference.decode("UTF-8")) computer_guid=computer_reference.decode("UTF-8"))
slap_partition._software_release_document._software_release = \
slap_partition._software_release_document._software_release.decode("UTF-8")
slap_partition._need_modification = 1 slap_partition._need_modification = 1
...@@ -951,8 +949,6 @@ class SlapTool(BaseTool): ...@@ -951,8 +949,6 @@ class SlapTool(BaseTool):
slap_partition._software_release_document = SoftwareRelease( slap_partition._software_release_document = SoftwareRelease(
software_release=software_instance.getUrlString().decode("UTF-8"), software_release=software_instance.getUrlString().decode("UTF-8"),
computer_guid=computer_id) computer_guid=computer_id)
slap_partition._software_release_document._software_release = \
slap_partition._software_release_document._software_release.decode("UTF-8")
slap_partition._need_modification = 1 slap_partition._need_modification = 1
...@@ -1599,8 +1595,6 @@ class SlapTool(BaseTool): ...@@ -1599,8 +1595,6 @@ class SlapTool(BaseTool):
software_release_response = SoftwareRelease( software_release_response = SoftwareRelease(
software_release=software_installation.getUrlString().decode('UTF-8'), software_release=software_installation.getUrlString().decode('UTF-8'),
computer_guid=computer_reference.decode('UTF-8')) computer_guid=computer_reference.decode('UTF-8'))
software_release_response._software_release = \
software_release_response._software_release.decode("UTF-8")
if software_installation.getSlapState() == 'destroy_requested': if software_installation.getSlapState() == 'destroy_requested':
software_release_response._requested_state = 'destroyed' software_release_response._requested_state = 'destroyed'
else: else:
......
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