mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-30 19:14:43 +00:00
Merge pull request #282 from cjmayo/python3_31
{python3_31} Python3: fix strformat strline()
This commit is contained in:
commit
b0b392f7cc
1 changed files with 5 additions and 1 deletions
|
|
@ -322,7 +322,11 @@ def limit (s, length=72):
|
|||
|
||||
def strline (s):
|
||||
"""Display string representation on one line."""
|
||||
return strip_control_chars(u"`%s'" % unicode(s).replace(u"\n", u"\\n"))
|
||||
try:
|
||||
s = unicode(s)
|
||||
except NameError:
|
||||
pass
|
||||
return strip_control_chars(u"`%s'" % s.replace(u"\n", u"\\n"))
|
||||
|
||||
|
||||
def format_feature_warning (**kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue