Fix error handling in salt.modules.file.statvfs

The old error messaged printed the wrong variable and was also
misleading as statvfs does not create any files.
This commit is contained in:
Julian Brost 2015-09-19 18:24:00 +02:00 committed by rallytime
parent b22286476e
commit 1beddf6311

View file

@ -2560,7 +2560,7 @@ def statvfs(path):
'f_blocks', 'f_bsize', 'f_favail', 'f_ffree', 'f_files', 'f_flag',
'f_frsize', 'f_namemax'))
except (OSError, IOError):
raise CommandExecutionError('Could not create {0!r}'.format(link))
raise CommandExecutionError('Could not statvfs {0!r}'.format(path))
return False