mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
It is better to die(), than to return falsely.
This commit is contained in:
parent
ebdef37b7e
commit
7f190ff890
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user