dont fail to create torrent for unicode titles
This commit is contained in:
parent
6386ec9b14
commit
9db8b57dd2
1 changed files with 2 additions and 0 deletions
|
@ -1059,6 +1059,8 @@ class Item(models.Model):
|
||||||
return
|
return
|
||||||
base = self.path('torrent')
|
base = self.path('torrent')
|
||||||
base = os.path.abspath(os.path.join(settings.MEDIA_ROOT, base))
|
base = os.path.abspath(os.path.join(settings.MEDIA_ROOT, base))
|
||||||
|
if isinstance(base, unicode):
|
||||||
|
base = base.encode('utf-8')
|
||||||
if os.path.exists(base):
|
if os.path.exists(base):
|
||||||
shutil.rmtree(base)
|
shutil.rmtree(base)
|
||||||
ox.makedirs(base)
|
ox.makedirs(base)
|
||||||
|
|
Loading…
Reference in a new issue