mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 02:07:07 -05:00 
			
		
		
		
	_search_regex's "isatty" call fails with Py2exe's
_search_regex calls the sys.stderr.isatty() function for unix systems. Py2exe uses a custom Stderr() stream which doesn't have an `isatty()` function, leading to it's crash. Fixes easily with checking that it's a unix system first.
This commit is contained in:
		
				
					committed by
					
						
						Philipp Hagemeister
					
				
			
			
				
	
			
			
			
						parent
						
							ebce53b3d8
						
					
				
				
					commit
					87a28127d2
				
			@@ -295,7 +295,7 @@ class InfoExtractor(object):
 | 
			
		||||
                mobj = re.search(p, string, flags)
 | 
			
		||||
                if mobj: break
 | 
			
		||||
 | 
			
		||||
        if sys.stderr.isatty() and os.name != 'nt':
 | 
			
		||||
        if os.name != 'nt' and sys.stderr.isatty():
 | 
			
		||||
            _name = u'\033[0;34m%s\033[0m' % name
 | 
			
		||||
        else:
 | 
			
		||||
            _name = name
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user