@@ -54,9 +54,7 @@ def _gather_new_camerastack_files():
54
54
os .system ("/usr/bin/list-usb-cameras > /tmp/camerastack-usb.log" )
55
55
files ["camerastack-usb.log" ] = "/tmp/camerastack-usb.log"
56
56
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" )
60
58
61
59
return files
62
60
@@ -86,9 +84,7 @@ def _gather_new_camerastack_files():
86
84
87
85
_gather_new_camerastack_files = lambda : { # noqa: F811
88
86
"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" ),
92
88
"camerastack-usb.log" : os .path .join (base , "fake_camerastack_usb.txt" ),
93
89
}
94
90
@@ -127,8 +123,7 @@ def from_value(cls, value=0):
127
123
"throttled" : _FLAG_THROTTLED & value == _FLAG_THROTTLED ,
128
124
"past_undervoltage" : _FLAG_PAST_UNDERVOLTAGE & value
129
125
== _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 ,
132
127
"past_throttled" : _FLAG_PAST_THROTTLED & value == _FLAG_PAST_THROTTLED ,
133
128
"raw_value" : value ,
134
129
}
@@ -245,9 +240,7 @@ def get_vcgencmd_throttled_state(command):
245
240
output , error = sarge .get_both (command , close_fds = CLOSE_FDS )
246
241
247
242
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 } " )
251
244
252
245
value = output [len ("throttled=" ) :].strip (" \t \r \n \0 " )
253
246
value = int (value , 0 )
0 commit comments