mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 03:47:07 -05:00 
			
		
		
		
	[utils/_windows_write_string] Be defensive about fileno (Fixes #2820)
This commit is contained in:
		@@ -926,7 +926,11 @@ def _windows_write_string(s, out):
 | 
			
		||||
        2: -12,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fileno = out.fileno()
 | 
			
		||||
    try:
 | 
			
		||||
        fileno = out.fileno()
 | 
			
		||||
    except AttributeError:
 | 
			
		||||
        # If the output stream doesn't have a fileno, it's virtual
 | 
			
		||||
        return False
 | 
			
		||||
    if fileno not in WIN_OUTPUT_IDS:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user