fix --max-time and add follow to redirections
This commit is contained in:
parent
6d550c7123
commit
f488895f79
@ -2,7 +2,7 @@ diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py
|
|||||||
index 56683fb..031ceec 100755
|
index 56683fb..031ceec 100755
|
||||||
--- a/installer/pluginhandler.py
|
--- a/installer/pluginhandler.py
|
||||||
+++ b/installer/pluginhandler.py
|
+++ b/installer/pluginhandler.py
|
||||||
@@ -185,14 +185,14 @@ class PluginHandle(object):
|
@@ -185,14 +185,16 @@ class PluginHandle(object):
|
||||||
if self.__plugin_conf_file.startswith('file://'):
|
if self.__plugin_conf_file.startswith('file://'):
|
||||||
status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True)
|
status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True)
|
||||||
else:
|
else:
|
||||||
@ -11,7 +11,9 @@ index 56683fb..031ceec 100755
|
|||||||
- status, output = utils.run("%s --tries=3 --timeout=60 --output-document=%s %s --cache=off" %(wget, local_conf, self.__plugin_conf_file))
|
- status, output = utils.run("%s --tries=3 --timeout=60 --output-document=%s %s --cache=off" %(wget, local_conf, self.__plugin_conf_file))
|
||||||
+ curl = utils.which("curl", True)
|
+ curl = utils.which("curl", True)
|
||||||
+ if curl:
|
+ if curl:
|
||||||
+ status, output = utils.run("%s --retry 3 --max-time=10 --output %s %s" %(curl, local_conf, self.__plugin_conf_file))
|
+ cmd = "%s --retry 3 --max-time 10 --output %s --location %s" %(curl, local_conf, self.__plugin_conf_file)
|
||||||
|
+ log.debug(cmd)
|
||||||
|
+ status, output = utils.run(cmd)
|
||||||
if status:
|
if status:
|
||||||
log.error("Plugin download failed with error code = %d" %status)
|
log.error("Plugin download failed with error code = %d" %status)
|
||||||
return status, url, check_sum
|
return status, url, check_sum
|
||||||
|
Loading…
Reference in New Issue
Block a user