It is better to die(), than to return falsely.

This commit is contained in:
Joseph Hall 2013-10-11 19:31:11 -06:00
parent ebdef37b7e
commit 7f190ff890

View File

@ -9,6 +9,8 @@ import logging
# Import salt libs
import salt.utils
from salt.exceptions import CommandExecutionError
log = logging.getLogger(__name__)
@ -37,7 +39,7 @@ def usage(args=None):
if flag in allowed:
flags += flag
else:
break
raise CommandExecutionError('Invalid flag passed to disk.usage')
if __grains__['kernel'] == 'Linux':
cmd = 'df -P'
elif __grains__['kernel'] == 'OpenBSD':