fix linting issues

This commit is contained in:
Robert Kaussow 2019-12-18 20:40:08 +01:00
parent c646cf35d6
commit dc021e474b
2 changed files with 11 additions and 13 deletions

View File

@ -110,13 +110,11 @@ class AgentCleanup:
self.logger.info("Stopping '{agent}' ({triage}/3) {force}".format(
agent=e, triage=control[e] or 3, force=force_msg))
#res = run_command(
# "drone -s {server} -t {token} --autoscaler {scaler} server destroy {force} {agent}".format(
# server=self.config["drone_server"], token=self.config["drone_token"], scaler=scaler, agent=e, force=force
#))
res = run_command("drone -s {server} -t {token} --autoscaler {scaler} server destroy {force} {agent}".format(
server=self.config["drone_server"], token=self.config["drone_token"], scaler=scaler, agent=e, force=force))
#if res.returncode > 0:
# self.log.sysexit_with_message("Command error:\n{}".format(humanize(res.stdout)))
if res.returncode > 0:
self.log.sysexit_with_message("Command error:\n{}".format(humanize(res.stdout)))
with open(self.config["statefile"], "wb") as json_file:
pickle.dump(control, json_file) # nosec