Skip to content

Commit 791c18d

Browse files
author
Fernando
committed
Fix tox analysis.
1 parent 848d27b commit 791c18d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SoftLayer/managers/hardware.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,8 +1004,12 @@ def _get_disk_price_detail(self, disk_data, upgrade_prices, disk_channel, disk_t
10041004
10051005
"""
10061006
if disk_data.get('description') == disk_type:
1007-
raise SoftLayerError("Unable to add the disk because this already exists."
1008-
if "add" in disk_type else "Unable to resize the disk because this does not exists.")
1007+
if "add" in disk_type:
1008+
disk_type_description = "Unable to add the disk because this already exists."
1009+
else:
1010+
disk_type_description = "Unable to resize the disk because this does not exists."
1011+
1012+
raise SoftLayerError(disk_type_description)
10091013
else:
10101014
price_id = self._get_prices_for_upgrade_option(upgrade_prices, disk_channel,
10111015
disk_data.get('capacity'))

0 commit comments

Comments
 (0)