Commit 5057e18a authored by Łukasz Nowak's avatar Łukasz Nowak

Encode to hex.

Data can be really complex string, which can be bad for tag.
parent e1b80468
...@@ -93,7 +93,7 @@ if (instance_xml == empty_parameter) or (instance_xml.startswith(empty_parameter ...@@ -93,7 +93,7 @@ if (instance_xml == empty_parameter) or (instance_xml.startswith(empty_parameter
hosting_subscription_portal_type = "Hosting Subscription"\n hosting_subscription_portal_type = "Hosting Subscription"\n
\n \n
tag = "%s_%s_inProgress" % (person.getUid(), \n tag = "%s_%s_inProgress" % (person.getUid(), \n
software_title)\n software_title.encode(\'hex\'))\n
\n \n
if (portal.portal_activities.countMessageWithTag(tag) > 0):\n if (portal.portal_activities.countMessageWithTag(tag) > 0):\n
# The software instance is already under creation but can not be fetched from catalog\n # The software instance is already under creation but can not be fetched from catalog\n
......
794 795
\ No newline at end of file \ No newline at end of file
...@@ -62,7 +62,7 @@ hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscrip ...@@ -62,7 +62,7 @@ hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscrip
\n \n
# Instance can be moved from one requester to another\n # Instance can be moved from one requester to another\n
# Prevent creating two instances with the same title\n # Prevent creating two instances with the same title\n
tag = "%s_%s_inProgress" % (hosting_subscription.getUid(), software_title)\n tag = "%s_%s_inProgress" % (hosting_subscription.getUid(), software_title.encode(\'hex\'))\n
if (portal.portal_activities.countMessageWithTag(tag) > 0):\n if (portal.portal_activities.countMessageWithTag(tag) > 0):\n
# The software instance is already under creation but can not be fetched from catalog\n # The software instance is already under creation but can not be fetched from catalog\n
# As it is not possible to fetch informations, it is better to raise an error\n # As it is not possible to fetch informations, it is better to raise an error\n
......
...@@ -82,7 +82,7 @@ else:\n ...@@ -82,7 +82,7 @@ else:\n
\n \n
# Instance can be moved from one requester to another\n # Instance can be moved from one requester to another\n
# Prevent creating two instances with the same title\n # Prevent creating two instances with the same title\n
tag = "%s_%s_inProgress" % (hosting_subscription.getUid(), software_title)\n tag = "%s_%s_inProgress" % (hosting_subscription.getUid(), software_title.encode(\'hex\'))\n
if (portal.portal_activities.countMessageWithTag(tag) > 0):\n if (portal.portal_activities.countMessageWithTag(tag) > 0):\n
# The software instance is already under creation but can not be fetched from catalog\n # The software instance is already under creation but can not be fetched from catalog\n
# As it is not possible to fetch informations, it is better to raise an error\n # As it is not possible to fetch informations, it is better to raise an error\n
......
42 43
\ No newline at end of file \ No newline at end of file
...@@ -458,7 +458,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin): ...@@ -458,7 +458,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
'test_vifib_customer').getUid() 'test_vifib_customer').getUid()
software_title = sequence['root_software_instance_title'] software_title = sequence['root_software_instance_title']
tag = "%s_%s_inProgress" % (person_uid, tag = "%s_%s_inProgress" % (person_uid,
software_title) software_title.encode('hex'))
self.assertNotEqual(0, self.portal.portal_activities. self.assertNotEqual(0, self.portal.portal_activities.
countMessageWithTag(tag)) countMessageWithTag(tag))
......
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