Skip to content

Commit

Permalink
make sure an invalid event does not cause a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Aug 10, 2024
1 parent 35cc6e9 commit 8b64a82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adjustor/drivers/smu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def notify(self, events: Sequence[Event]):
case "performance":
self.new_tdp = 25

if ev['type'] == 'special' and ev['event'] == "wakeup":
if ev['type'] == 'special' and ev.get('event', None) == "wakeup":
logger.info(f"Waking up from sleep, resetting TDP after {SLEEP_DELAY} seconds.")
self.queued = time.time() + SLEEP_DELAY

Expand Down

0 comments on commit 8b64a82

Please sign in to comment.