Skip to content

Commit 3287aef

Browse files
committed
Merge pull request softlayer#471 from Neetuj/issue470
Issue470
2 parents d14de67 + 2752e0f commit 3287aef

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

SoftLayer/CLI/server/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ def get_create_options(ds_options, section, pretty=True):
114114

115115
elif 'disk' == section:
116116
disks = []
117-
type_regex = re.compile(r'^[\d\.]+[GT]B\s+(.+)$')
117+
type_regex = re.compile(r'^[\d\.\s]+[GT]B\s+(.+)$')
118118
for disk in ds_options['categories']['disk0']['items']:
119119
disk_type = 'SATA'
120-
disk_type = type_regex.match(disk['description']).group(1)
121-
120+
if type_regex.match(disk['description']) is not None:
121+
disk_type = type_regex.match(disk['description']).group(1)
122122
disk_type = disk_type.replace('RPM', '').strip()
123123
disk_type = disk_type.replace(' ', '_').upper()
124124
disk_type = str(int(disk['capacity'])) + '_' + disk_type

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ commands =
2929
-d I0011 \ # Locally Disabling
3030
--max-args=20 \
3131
--max-branches=40 \
32-
--max-statements=86 \
32+
--max-statements=87 \
3333
--max-returns=8 \
3434
--min-public-methods=0 \
3535
--min-similarity-lines=30

0 commit comments

Comments
 (0)