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
 | 
					            # libusb fails to initialize in containers without USB subsystems
 | 
				
			||||||
            exclusions.update(set('libusb libmtp'.split()))
 | 
					            exclusions.update(set('libusb libmtp'.split()))
 | 
				
			||||||
        from importlib import import_module
 | 
					        from importlib import import_module
 | 
				
			||||||
        from importlib.resources import contents
 | 
					        from importlib.resources import files
 | 
				
			||||||
        for name in contents('calibre_extensions'):
 | 
					        for name in (path.name for path in files('calibre_extensions').iterdir()):
 | 
				
			||||||
            if name in exclusions:
 | 
					            if name in exclusions:
 | 
				
			||||||
                if name in ('libusb', 'libmtp'):
 | 
					                if name in ('libusb', 'libmtp'):
 | 
				
			||||||
                    # Just check that the DLL can be loaded
 | 
					                    # Just check that the DLL can be loaded
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user