mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Don't try to get a hash of a directory
This commit is contained in:
parent
41c5d7f80b
commit
6b0c5f2e01
@ -474,6 +474,8 @@ def get_sum(path, form='md5'):
|
||||
|
||||
salt '*' file.get_sum /etc/passwd sha512
|
||||
'''
|
||||
if not os.path.isfile(path):
|
||||
return 'File not found'
|
||||
return salt.utils.get_hash(path, form, 4096)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user