From 8a00a40d982399bd38a8479d0f9618d95de36f26 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 5 Apr 2011 18:03:26 +0200 Subject: [PATCH] subprocess.Popen only takes utf-8 encoded strings --- pandora/item/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 45046293..cb16dcdf 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -755,8 +755,8 @@ class Item(models.Model): for poster in posters: frame = posters[poster] cmd = [settings.ITEM_POSTER, - '-t', self.get('title'), - '-d', ', '.join(self.get('director', ['Unknown Director'])), + '-t', self.get('title').encode('utf-8'), + '-d', u', '.join(self.get('director', ['Unknown Director'])).encode('utf-8'), '-y', str(self.get('year', '')), '-p', poster ] @@ -771,7 +771,6 @@ class Item(models.Model): cmd += ['-o', self.oxdbId] else: cmd += ['-i', self.itemId] - print cmd p = subprocess.Popen(cmd) p.wait() return posters.keys()