From 8be83782ba60b8c7552872416c61c83ad0863044 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Sun, 5 Jun 2022 20:14:47 -0400 Subject: [PATCH] Default data=None for get_file, and reattach retries in send --- plugins/connection/httpapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/connection/httpapi.py b/plugins/connection/httpapi.py index 35d8294ce..26c4605cd 100644 --- a/plugins/connection/httpapi.py +++ b/plugins/connection/httpapi.py @@ -255,7 +255,7 @@ def close(self): super(Connection, self).close() @ensure_connect - def _open_url(self, path, data, retries=None, **kwargs): + def _open_url(self, path, data=None, retries=None, **kwargs): url_kwargs = dict( timeout=self.get_option("persistent_command_timeout"), validate_certs=self.get_option("validate_certs"), @@ -304,7 +304,7 @@ def send(self, path, data, retries=None, **kwargs): """ Sends the command to the device over api """ - response = self._open_url(path, data, **kwargs) + response = self._open_url(path, data, retries, **kwargs) response_buffer = BytesIO() resp_data = response.read()