mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	Aria2c: Fallback to an empty list if stopped_downloads is None
This was fine during most testing in the `for` loop below it, but there's also a len() a bit below that.
This commit is contained in:
		
							parent
							
								
									837015b4ea
								
							
						
					
					
						commit
						a8a89aab9c
					
				@ -212,8 +212,8 @@ def download(
 | 
			
		||||
                secret=rpc_secret,
 | 
			
		||||
                method="aria2.tellStopped",
 | 
			
		||||
                params=[0, 999999]
 | 
			
		||||
            )
 | 
			
		||||
            for dl in stopped_downloads or []:
 | 
			
		||||
            ) or []
 | 
			
		||||
            for dl in stopped_downloads:
 | 
			
		||||
                if dl["status"] == "complete":
 | 
			
		||||
                    yield dict(advance=1)
 | 
			
		||||
                elif dl["status"] == "error":
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user