mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	Properly convert errors to strings
This commit is contained in:
		| @@ -5,9 +5,9 @@ import re | ||||
| import sys | ||||
| import time | ||||
|  | ||||
| from ..compat import compat_str | ||||
| from ..utils import ( | ||||
|     encodeFilename, | ||||
|     error_to_str, | ||||
|     decodeArgument, | ||||
|     format_bytes, | ||||
|     timeconvert, | ||||
| @@ -186,7 +186,7 @@ class FileDownloader(object): | ||||
|                 return | ||||
|             os.rename(encodeFilename(old_filename), encodeFilename(new_filename)) | ||||
|         except (IOError, OSError) as err: | ||||
|             self.report_error('unable to rename file: %s' % compat_str(err)) | ||||
|             self.report_error('unable to rename file: %s' % error_to_str(err)) | ||||
|  | ||||
|     def try_utime(self, filename, last_modified_hdr): | ||||
|         """Try to set the last-modified time of the given file.""" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user