Download spm package from remote repository and save it to cache directory

fixes #37138
This commit is contained in:
Alexander Werner 2016-10-21 09:28:50 +02:00
parent 8c46d69251
commit e3916813bb

View file

@ -426,7 +426,9 @@ class SPMClient(object):
dl_path = dl_path.replace('file://', '')
shutil.copyfile(dl_path, out_file)
else:
http.query(dl_path, text_out=out_file)
response = http.query(dl_path, text=True)
with salt.utils.fopen(out_file, 'w') as outf:
outf.write(response.get("text"))
self._local_install((None, out_file), package)
return