We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e933f81 commit 2f7e0dcCopy full SHA for 2f7e0dc
1 file changed
SoftLayer/managers/network.py
@@ -7,6 +7,7 @@
7
"""
8
9
from SoftLayer import utils
10
+from SoftLayer import exceptions
11
12
DEFAULT_SUBNET_MASK = ','.join(['hardware',
13
'datacenter',
@@ -133,7 +134,7 @@ def cancel_subnet(self, subnet_id):
133
134
135
subnet = self.get_subnet(subnet_id, mask='id, billingItem.id')
136
if "billingItem" not in subnet:
- raise ValueError('can not cancel subnet %s' % subnet_id)
137
+ raise exceptions.SoftLayerError('Can not cancel subnet %s' % subnet_id)
138
billing_id = subnet['billingItem']['id']
139
return self.client['Billing_Item'].cancelService(id=billing_id)
140
0 commit comments