mirror of
				https://github.com/devine-dl/pywidevine.git
				synced 2025-11-04 03:44:50 +00:00 
			
		
		
		
	PSSH: Merge some collapsible if statements
This commit is contained in:
		
							parent
							
								
									7436c60d00
								
							
						
					
					
						commit
						f0df2f4490
					
				@ -108,12 +108,10 @@ class PSSH:
 | 
			
		||||
        flags: int = 0
 | 
			
		||||
    ) -> PSSH:
 | 
			
		||||
        """Craft a new version 0 or 1 PSSH Box."""
 | 
			
		||||
        if key_ids is not None:
 | 
			
		||||
            if not isinstance(key_ids, list):
 | 
			
		||||
        if key_ids is not None and not isinstance(key_ids, list):
 | 
			
		||||
            raise TypeError(f"Expected key_ids to be a list not {key_ids!r}")
 | 
			
		||||
 | 
			
		||||
        if init_data is not None:
 | 
			
		||||
            if not isinstance(init_data, (WidevinePsshData, str, bytes)):
 | 
			
		||||
        if init_data is not None and not isinstance(init_data, (WidevinePsshData, str, bytes)):
 | 
			
		||||
            raise TypeError(f"Expected init_data to be a {WidevinePsshData}, base64, or bytes, not {init_data!r}")
 | 
			
		||||
 | 
			
		||||
        if not isinstance(version, int):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user