mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25870 from rallytime/bp-25824
Back-port #25824 to 2015.5
This commit is contained in:
commit
c4c9e40be6
1 changed files with 4 additions and 2 deletions
|
@ -2929,9 +2929,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…
Add table
Reference in a new issue