Skip to content

Commit

Permalink
flake 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jlashner committed Jul 26, 2023
1 parent 09405e6 commit 5bac132
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions socs/agents/hwp_supervisor/agent.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argparse
import enum
import os
import threading
import time
Expand Down Expand Up @@ -254,8 +253,8 @@ def update_ups_state(self, op):
else:
raise ValueError('Could not find upsOutputSource OID')

for k, field in ups_keymap.items():
setattr(self, k, data[f'{field[0]}_{ups_oid}'][field[1]])
for k, f in ups_keymap.items():
setattr(self, k, data[f'{f[0]}_{ups_oid}'][f[1]])

self.ups_last_connection_attempt = data['ups_connection']['last_attempt']
self.ups_connected = data['ups_connection']['connected']
Expand Down Expand Up @@ -486,15 +485,15 @@ def run_and_validate(self, op, kwargs=None, timeout=10, log=None):
raise ControlClientError("op-start returned Error:\n msg: " + msg)

if status == ocs.TIMEOUT:
raise ControlClientError(f"op-start timed out")
raise ControlClientError("op-start timed out")

status, msg, session = op.wait(timeout=timeout)

if status == ocs.ERROR:
raise ControlClientError("op-wait returned Error:\n msg: " + msg)

if status == ocs.TIMEOUT:
raise ControlClientError(f"op-wait timed out")
raise ControlClientError("op-wait timed out")

self.log.info("Completed op: name={name}, success={success}, kwargs={kw}",
name=session.get('op_name'), success=session.get('success'),
Expand Down

0 comments on commit 5bac132

Please sign in to comment.