@@ -54,9 +54,7 @@ def _gather_new_camerastack_files():
5454 os .system ("/usr/bin/list-usb-cameras > /tmp/camerastack-usb.log" )
5555 files ["camerastack-usb.log" ] = "/tmp/camerastack-usb.log"
5656 except Exception :
57- logging .getLogger (__name__ ).exception (
58- "Failed to create camerastack-usb.log file"
59- )
57+ logging .getLogger (__name__ ).exception ("Failed to create camerastack-usb.log file" )
6058
6159 return files
6260
@@ -86,9 +84,7 @@ def _gather_new_camerastack_files():
8684
8785 _gather_new_camerastack_files = lambda : { # noqa: F811
8886 "camerastack-journal.log" : os .path .join (base , "fake_camerastack_journal.txt" ),
89- "camerastack-libcamera.log" : os .path .join (
90- base , "fake_camerastack_libcamera.txt"
91- ),
87+ "camerastack-libcamera.log" : os .path .join (base , "fake_camerastack_libcamera.txt" ),
9288 "camerastack-usb.log" : os .path .join (base , "fake_camerastack_usb.txt" ),
9389 }
9490
@@ -127,8 +123,7 @@ def from_value(cls, value=0):
127123 "throttled" : _FLAG_THROTTLED & value == _FLAG_THROTTLED ,
128124 "past_undervoltage" : _FLAG_PAST_UNDERVOLTAGE & value
129125 == _FLAG_PAST_UNDERVOLTAGE ,
130- "past_freq_capped" : _FLAG_PAST_FREQ_CAPPED & value
131- == _FLAG_PAST_FREQ_CAPPED ,
126+ "past_freq_capped" : _FLAG_PAST_FREQ_CAPPED & value == _FLAG_PAST_FREQ_CAPPED ,
132127 "past_throttled" : _FLAG_PAST_THROTTLED & value == _FLAG_PAST_THROTTLED ,
133128 "raw_value" : value ,
134129 }
@@ -245,9 +240,7 @@ def get_vcgencmd_throttled_state(command):
245240 output , error = sarge .get_both (command , close_fds = CLOSE_FDS )
246241
247242 if "throttled=0x" not in output :
248- raise ValueError (
249- f"Cannot parse { command !r} output: { error if error else output } "
250- )
243+ raise ValueError (f"Cannot parse { command !r} output: { error if error else output } " )
251244
252245 value = output [len ("throttled=" ) :].strip (" \t \r \n \0 " )
253246 value = int (value , 0 )
0 commit comments