forked from Github/frigate
Use escapse string in get_intel_gpu_stats (#13452)
````
frigate/util/services.py:299: SyntaxWarning: invalid escape sequence '\d'
for result in re.findall('"Video/\d":{[a-z":\d.,%]+}', reading):
````
This commit is contained in:
@@ -296,7 +296,7 @@ def get_intel_gpu_stats() -> dict[str, str]:
|
|||||||
|
|
||||||
# video is used for vaapi
|
# video is used for vaapi
|
||||||
video = []
|
video = []
|
||||||
for result in re.findall('"Video/\d":{[a-z":\d.,%]+}', reading):
|
for result in re.findall(r'"Video/\d":{[a-z":\d.,%]+}', reading):
|
||||||
packet = json.loads(result[10:])
|
packet = json.loads(result[10:])
|
||||||
single = packet.get("busy", 0.0)
|
single = packet.get("busy", 0.0)
|
||||||
video.append(float(single))
|
video.append(float(single))
|
||||||
|
|||||||
Reference in New Issue
Block a user