mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #25824 from klyr/fix_get_managed
Fix get_managed() in file.py module for local files
This commit is contained in:
commit
0216277dbb
@ -3164,9 +3164,11 @@ def get_managed(
|
||||
return '', {}, 'Source file {0} not found'.format(source)
|
||||
# if its a local file
|
||||
elif urlparsed_source.scheme == 'file':
|
||||
source_sum = get_hash(urlparsed_source.path)
|
||||
file_sum = get_hash(urlparsed_source.path, form='sha256')
|
||||
source_sum = {'hsum': file_sum, 'hash_type': 'sha256'}
|
||||
elif source.startswith('/'):
|
||||
source_sum = get_hash(source)
|
||||
file_sum = get_hash(source, form='sha256')
|
||||
source_sum = {'hsum': file_sum, 'hash_type': 'sha256'}
|
||||
elif source_hash:
|
||||
protos = ('salt', 'http', 'https', 'ftp', 'swift', 's3')
|
||||
if _urlparse(source_hash).scheme in protos:
|
||||
|
Loading…
Reference in New Issue
Block a user