Skip to content

Commit b93a90d

Browse files
committed
remove redundant to_unicode invocations
1 parent 67d05ab commit b93a90d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tracext/git/git_fs.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ def _format_sha_link(self, formatter, sha, label):
126126
title=shorten_line(changeset.message),
127127
href=formatter.href.changeset(sha, repos.reponame))
128128
except Exception, e:
129-
errmsg = to_unicode(e)
130-
131-
return tag.a(label, class_="missing changeset",
132-
title=to_unicode(errmsg), rel="nofollow")
129+
return tag.a(label, class_="missing changeset",
130+
title=to_unicode(e), rel="nofollow")
133131

134132
def get_wiki_syntax(self):
135133
yield (r'(?:\b|!)r?[0-9a-fA-F]{%d,40}\b' % self._wiki_shortrev_len,
@@ -261,9 +259,8 @@ def sha_link(sha, label=None):
261259
href=context.href.changeset(sha, repos.reponame))
262260

263261
except Exception, e:
264-
errmsg = to_unicode(e)
265262
return tag.a(sha, class_="missing changeset",
266-
title=to_unicode(errmsg), rel="nofollow")
263+
title=to_unicode(e), rel="nofollow")
267264

268265
if name == 'Branches':
269266
branches = props[name]

0 commit comments

Comments
 (0)