fix bug#777: close issue failed with unicode labels
@@ -147,7 +147,11 @@ class _Issue(models.GitHubCore):
"""
assignee = self.assignee.login if self.assignee else ''
number = self.milestone.number if self.milestone else None
+ try:
labels = [str(l) for l in self.original_labels]
+ except UnicodeEncodeError:
+ labels = [l.name for l in self.original_labels]
+
return self.edit(self.title, self.body, assignee, 'closed',
number, labels)
