Skip to content

Commit

Permalink
Merge pull request #471 from Neetuj/issue470
Browse files Browse the repository at this point in the history
Issue470
  • Loading branch information
sudorandom committed Jan 12, 2015
2 parents d14de67 + 2752e0f commit 3287aef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions SoftLayer/CLI/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def get_create_options(ds_options, section, pretty=True):

elif 'disk' == section:
disks = []
type_regex = re.compile(r'^[\d\.]+[GT]B\s+(.+)$')
type_regex = re.compile(r'^[\d\.\s]+[GT]B\s+(.+)$')
for disk in ds_options['categories']['disk0']['items']:
disk_type = 'SATA'
disk_type = type_regex.match(disk['description']).group(1)

if type_regex.match(disk['description']) is not None:
disk_type = type_regex.match(disk['description']).group(1)
disk_type = disk_type.replace('RPM', '').strip()
disk_type = disk_type.replace(' ', '_').upper()
disk_type = str(int(disk['capacity'])) + '_' + disk_type
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ commands =
-d I0011 \ # Locally Disabling
--max-args=20 \
--max-branches=40 \
--max-statements=86 \
--max-statements=87 \
--max-returns=8 \
--min-public-methods=0 \
--min-similarity-lines=30
Expand Down

0 comments on commit 3287aef

Please sign in to comment.