aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-11-27 23:29:18 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-11-27 23:29:18 +0100
commit96731798dbdd5a8878ac5cf29b69c6c7c821311b (patch)
treea8699f7460fcc1b3892afce2d78ca9e816692eca /youtube_dl/FileDownloader.py
parentc116339ddbe62d88b6295d519c03027070ec7d0d (diff)
Rename util.u to util.compat_str
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r--youtube_dl/FileDownloader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 870c82272..815b81296 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -332,7 +332,7 @@ class FileDownloader(object):
template_dict['autonumber'] = u'%05d' % self._num_downloads
template_dict = dict((key, u'NA' if val is None else val) for key, val in template_dict.items())
- template_dict = dict((k, sanitize_filename(u(v), self.params.get('restrictfilenames'))) for k,v in template_dict.items())
+ template_dict = dict((k, sanitize_filename(compat_str(v), self.params.get('restrictfilenames'))) for k,v in template_dict.items())
filename = self.params['outtmpl'] % template_dict
return filename
@@ -403,7 +403,7 @@ class FileDownloader(object):
if dn != '' and not os.path.exists(dn): # dn is already encoded
os.makedirs(dn)
except (OSError, IOError), err:
- self.trouble(u'ERROR: unable to create directory ' + u(err))
+ self.trouble(u'ERROR: unable to create directory ' + compat_str(err))
return
if self.params.get('writedescription', False):