Commit 0ede1d85 authored by Rafael Monnerat's avatar Rafael Monnerat

py3: 2to3 -j 20 --write --nobackups --no-diffs --fix=except master

parent d006f91e
......@@ -126,7 +126,7 @@ try:
instance_tree.activate(activity="SQLQueue", tag=tag,
after_tag="allocate_%s" % compute_partition_url).getId()
except ValueError, e:
except ValueError as e:
# It was not possible to find free Compute Partition
markHistory(software_instance, 'Allocation failed: no free Compute Partition %s' % e)
else:
......
......@@ -17,7 +17,7 @@ currency_value = portal.restrictedTraverse(price_currency)
# create the subscription request, which will lead to the Open Order
try:
subscription_request = resource.Resource_createSubscriptionRequest(customer, [], project, currency_value=currency_value)
except AssertionError, e:
except AssertionError as e:
if batch:
raise
return context.Base_redirect(
......
......@@ -92,11 +92,11 @@ def convertToREST(function):
"""
try:
retval = function(self, *args, **kwd)
except (ValueError, AttributeError), log:
except (ValueError, AttributeError) as log:
LOG('SlapTool', INFO, 'Converting ValueError to NotFound, real error:',
error=True)
raise NotFound(log)
except SoftwareInstanceNotReady, log:
except SoftwareInstanceNotReady as log:
self.REQUEST.response.setStatus(408)
self.REQUEST.response.setHeader('Cache-Control', 'private')
return self.REQUEST.response
......
......@@ -58,7 +58,7 @@ if destination_decision_value is None:
try:
subscription_request = service.Resource_createSubscriptionRequest(destination_decision_value, resource_vcl, project_value, currency_value=currency_value, default_price=default_price)
except AssertionError, error:
except AssertionError as error:
storeWorkflowComment(item, str(error))
return
subscription_request.setAggregateValue(item)
......
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