subprocess.Popen only takes utf-8 encoded strings
This commit is contained in:
parent
ca46b1579d
commit
59ad75f7ab
1 changed files with 2 additions and 3 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue