Merge branch 'fix-21543-blockdev-tune-issue' into fix-21546-blockdev-tune-state-change-issue

This commit is contained in:
Robert Fach 2015-03-12 12:30:45 +00:00
commit 370bf5276e

View File

@ -52,7 +52,9 @@ def tune(device, **kwargs):
switch = kwarg_map[key]
if key != 'read-write':
args.append(switch.replace('set', 'get'))
if kwargs[key] == 'True':
else:
args.append('getro')
if kwargs[key] == 'True' or kwargs[key] == True:
opts += '--{0} '.format(key)
else:
opts += '--{0} {1} '.format(switch, kwargs[key])