File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,12 +271,16 @@ def _randr_output_ids(
271271 edid_params ["mfr_date" ] = f"{ edid_data ['manufacture_year' ]:04d} "
272272 if "model_year" in edid_data :
273273 edid_params ["model_year" ] = f"{ edid_data ['model_year' ]:04d} "
274- rv ["unique_id" ] = urlencode (edid_params )
274+ if edid_params :
275+ rv ["unique_id" ] = urlencode (edid_params )
275276
276277 return rv
277278
278279 @staticmethod
279280 def _choose_randr_output (outputs : Array [xcb .RandrOutput ], primary_output : xcb .RandrOutput , / ) -> xcb .RandrOutput :
281+ if len (outputs ) == 0 :
282+ msg = "No RandR outputs available"
283+ raise ScreenShotError (msg )
280284 if any (o == primary_output for o in outputs ):
281285 return primary_output
282286 return outputs [0 ]
Original file line number Diff line number Diff line change 2323_EDID_DESCR_TAG_LOC = 3 # Location of display descriptor tag
2424_EDID_DESCR_TAG_SN = 0xFF # Descriptor is a string serial number
2525_EDID_DESCR_TAG_NAME = 0xFC # Descriptor is a string model name
26- _EDID_DESCR_STR_LOC = slice (5 , 19 ) # Location of string in a display descriptor
26+ _EDID_DESCR_STR_LOC = slice (5 , 18 ) # Location of string in a display descriptor
2727
2828
2929def parse_edid (edid_data : bytes ) -> dict :
You can’t perform that action at this time.
0 commit comments