mirror of https://github.com/aristocratos/bpytop
Replace fix with a more idiomatic version
This was suggested by @UmarJ. Thanks!pull/315/head
parent
2002d8049b
commit
83bbfcff1b
|
@ -1141,9 +1141,8 @@ class Color:
|
||||||
else:
|
else:
|
||||||
raise ValueError(f'RGB dec should be "0-255 0-255 0-255"')
|
raise ValueError(f'RGB dec should be "0-255 0-255 0-255"')
|
||||||
|
|
||||||
for i in [0, 1, 2]:
|
if not all(0 <= c <= 255 for c in self.dec):
|
||||||
if not (0 <= self.dec[i] <= 255):
|
raise ValueError(f'One or more RGB values are out of range: {color}')
|
||||||
raise ValueError(f'One or more RGB values are out of range: {color}')
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errlog.exception(str(e))
|
errlog.exception(str(e))
|
||||||
|
|
Loading…
Reference in New Issue