aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/common.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-12-20 05:27:38 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-20 05:27:38 +0600
commit7f8b271465df75bb1f83cb181dc45fee5fe02cf9 (patch)
treea17694aae937027a453b6d279dff3be5530e73e9 /youtube_dl/downloader/common.py
parentfdae2358581be6f80ac5fd20b1062e87a8797f46 (diff)
downloadyoutube-dl-7f8b271465df75bb1f83cb181dc45fee5fe02cf9.tar.xz
Properly convert errors to strings
Diffstat (limited to 'youtube_dl/downloader/common.py')
-rw-r--r--youtube_dl/downloader/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index b8bf8daf8..eb63ccffd 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -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."""