vhost static fix
[turniej.git] / apps / poetry / models.py
index b0d15b1..ef8bf94 100644 (file)
@@ -30,7 +30,7 @@ class Poet(models.Model):
             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         os.chdir(curdir)
         stdout, stderr = proc.communicate()
             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         os.chdir(curdir)
         stdout, stderr = proc.communicate()
-        text = stdout.decode("utf-8")[:1000]
+        text = unicode(stdout, "utf-8", errors="ignore")[:1000]
         slug = get_hash(text)
         title = ''
         if self.first_line_title:
         slug = get_hash(text)
         title = ''
         if self.first_line_title: