subprocess.Popen only takes utf-8 encoded strings

This commit is contained in:
j 2011-04-05 18:03:26 +02:00
parent ca46b1579d
commit 59ad75f7ab

View file

@ -755,8 +755,8 @@ class Item(models.Model):
for poster in posters: for poster in posters:
frame = posters[poster] frame = posters[poster]
cmd = [settings.ITEM_POSTER, cmd = [settings.ITEM_POSTER,
'-t', self.get('title'), '-t', self.get('title').encode('utf-8'),
'-d', ', '.join(self.get('director', ['Unknown Director'])), '-d', u', '.join(self.get('director', ['Unknown Director'])).encode('utf-8'),
'-y', str(self.get('year', '')), '-y', str(self.get('year', '')),
'-p', poster '-p', poster
] ]
@ -771,7 +771,6 @@ class Item(models.Model):
cmd += ['-o', self.oxdbId] cmd += ['-o', self.oxdbId]
else: else:
cmd += ['-i', self.itemId] cmd += ['-i', self.itemId]
print cmd
p = subprocess.Popen(cmd) p = subprocess.Popen(cmd)
p.wait() p.wait()
return posters.keys() return posters.keys()