Skip to content

Commit f5dd2ca

Browse files
committed
Merge branch 'power/fix_issue_206' into 'master'
Power/fix issue 206 See merge request leinardi/gwe!76
2 parents bdc37da + fbc4c6a commit f5dd2ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gwe/view/main_view.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ def refresh_status(self, status: Optional[Status], gpu_index: int) -> None:
248248
minimum = gpu_status.power.minimum
249249
maximum = gpu_status.power.maximum
250250
default = gpu_status.power.default
251-
if minimum is not None and maximum is not None and default is not None and minimum != maximum:
252-
limit = gpu_status.power.limit
251+
limit = gpu_status.power.limit
252+
if (minimum is not None and maximum is not None
253+
and default is not None and limit is not None
254+
and minimum != maximum):
253255
self._power_limit_adjustment.set_lower(minimum)
254256
self._power_limit_adjustment.set_upper(maximum)
255257
self._power_limit_adjustment.set_value(limit)

0 commit comments

Comments
 (0)