From 14b5384572a9d8af097ca0a545d3713699b72fbb Mon Sep 17 00:00:00 2001 From: Arksine Date: Fri, 1 Jan 2021 20:35:29 -0500 Subject: [PATCH] update_manager: retry failed "run_with_response" commands Signed-off-by: Eric Callahan --- moonraker/plugins/update_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moonraker/plugins/update_manager.py b/moonraker/plugins/update_manager.py index c413763..691004e 100644 --- a/moonraker/plugins/update_manager.py +++ b/moonraker/plugins/update_manager.py @@ -144,7 +144,10 @@ class UpdateManager: async def execute_cmd_with_response(self, cmd, timeout=10.): shell_command = self.server.lookup_plugin('shell_command') scmd = shell_command.build_shell_command(cmd, None) - return await scmd.run_with_response(timeout) + result = await scmd.run_with_response(timeout, retries=5) + if result is None: + raise self.server.error(f"Error Running Command: {cmd}") + return result async def _init_api_rate_limit(self): url = "https://api.github.com/rate_limit"