Use msg.rstrip() as suggested in review

This commit is contained in:
Bruno Oliveira 2019-05-07 15:20:00 -03:00 committed by GitHub
parent 32a5e80a6d
commit c04767f946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1000,8 +1000,7 @@ def _get_line_with_reprcrash_message(config, rep, termwidth):
# u'😄' will result in a High Surrogate (U+D83D) character, which is
# rendered as u'<27>'; in this case we just strip that character out as it
# serves no purpose being rendered
while msg.endswith(u"\uD83D"):
msg = msg[:-1]
msg = msg.rstrip(u"\uD83D")
msg += ellipsis
line += sep + msg
return line