mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 01:57:08 -05:00 
			
		
		
		
	Guard against sys.getfilesystemencoding() == None (#503)
This commit is contained in:
		@@ -409,7 +409,10 @@ def encodeFilename(s):
 | 
			
		||||
        # match Windows 9x series as well. Besides, NT 4 is obsolete.)
 | 
			
		||||
        return s
 | 
			
		||||
    else:
 | 
			
		||||
        return s.encode(sys.getfilesystemencoding(), 'ignore')
 | 
			
		||||
        encoding = sys.getfilesystemencoding()
 | 
			
		||||
        if encoding is None:
 | 
			
		||||
            encoding = 'utf-8'
 | 
			
		||||
        return s.encode(encoding, 'ignore')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ExtractorError(Exception):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user