#13 fix --max-time and add follow to redirections
Merged 4 months ago by zdohnal. Opened 4 months ago by mikhail.
rpms/ mikhail/hplip rawhide  into  rawhide

file modified
+4 -2
@@ -2,7 +2,7 @@ 

  index 56683fb..031ceec 100755

  --- a/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://'):

                       status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True)

                   else:
@@ -11,7 +11,9 @@ 

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

  +                    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:

                               log.error("Plugin download failed with error code = %d" %status)

                               return status, url, check_sum

This PR fix issue https://bugzilla.redhat.com/show_bug.cgi?id=2242710
- incorrect "--max-time" parameter
- add following to redirection

rebased onto f488895

4 months ago

Hi Mikhail,

thank you for the PR! LGTM.

Pull-Request has been merged by zdohnal

4 months ago
Metadata