Don't try to get a hash of a directory

This commit is contained in:
David Boucha 2014-08-07 11:50:00 -06:00
parent 41c5d7f80b
commit 6b0c5f2e01

View File

@ -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)