From effeb65115d05fa4d89a3cbb1fd5fc116ef05e21 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 18 Jan 2014 11:22:58 +0000 Subject: [PATCH] unicode path issues, fixes #2069 --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 0d9ed063..bfbc4694 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -410,6 +410,8 @@ class Item(models.Model): def delete_files(self): path = os.path.join(settings.MEDIA_ROOT, self.path()) + if isinstance(path, unicode): + path = path.encode('utf-8') if os.path.exists(path): shutil.rmtree(path)