Skip to content

Commit 35f4d6a

Browse files
authored
Merge pull request #307 from frappe/mergify/bp/master/pr-306
fix(server): Always raise error when nginx reload fails (backport #306)
2 parents cdad988 + dadca4d commit 35f4d6a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

agent/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,11 @@ def _reload_nginx(self):
945945
return self.execute("sudo systemctl reload nginx")
946946
except AgentException as e:
947947
try:
948-
return self.execute("sudo nginx -t")
948+
self.execute("sudo nginx -t")
949949
except AgentException as e2:
950950
raise e2 from e
951+
else:
952+
raise e
951953

952954
def _render_template(self, template, context, outfile, options=None):
953955
if options is None:

0 commit comments

Comments
 (0)