Skip to content

Commit 2f7e0dc

Browse files
author
Neetu Jain
committed
changing error raised
1 parent e933f81 commit 2f7e0dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

SoftLayer/managers/network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88

99
from SoftLayer import utils
10+
from SoftLayer import exceptions
1011

1112
DEFAULT_SUBNET_MASK = ','.join(['hardware',
1213
'datacenter',
@@ -133,7 +134,7 @@ def cancel_subnet(self, subnet_id):
133134
"""
134135
subnet = self.get_subnet(subnet_id, mask='id, billingItem.id')
135136
if "billingItem" not in subnet:
136-
raise ValueError('can not cancel subnet %s' % subnet_id)
137+
raise exceptions.SoftLayerError('Can not cancel subnet %s' % subnet_id)
137138
billing_id = subnet['billingItem']['id']
138139
return self.client['Billing_Item'].cancelService(id=billing_id)
139140

0 commit comments

Comments
 (0)