mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	Replace use of deprecated contents() function
This commit is contained in:
		
							parent
							
								
									c574efa808
								
							
						
					
					
						commit
						15debf7ebf
					
				@ -135,8 +135,8 @@ class BuildTest(unittest.TestCase):
 | 
			
		||||
            # libusb fails to initialize in containers without USB subsystems
 | 
			
		||||
            exclusions.update(set('libusb libmtp'.split()))
 | 
			
		||||
        from importlib import import_module
 | 
			
		||||
        from importlib.resources import contents
 | 
			
		||||
        for name in contents('calibre_extensions'):
 | 
			
		||||
        from importlib.resources import files
 | 
			
		||||
        for name in (path.name for path in files('calibre_extensions').iterdir()):
 | 
			
		||||
            if name in exclusions:
 | 
			
		||||
                if name in ('libusb', 'libmtp'):
 | 
			
		||||
                    # Just check that the DLL can be loaded
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user