Resolves #466. Items that are not strings are converted into strings before being turned into ANSIStrings.
This commit is contained in:
parent
382bf01bef
commit
f446a74c28
1 changed files with 2 additions and 0 deletions
|
|
@ -356,6 +356,8 @@ class ANSIString(unicode):
|
||||||
decode strings, as escapes can only be respected once.
|
decode strings, as escapes can only be respected once.
|
||||||
"""
|
"""
|
||||||
string = args[0]
|
string = args[0]
|
||||||
|
if not isinstance(string, basestring):
|
||||||
|
string = str(string)
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
parser = kwargs.get('parser', ANSI_PARSER)
|
parser = kwargs.get('parser', ANSI_PARSER)
|
||||||
decoded = kwargs.get('decoded', False) or hasattr(string, 'raw_string')
|
decoded = kwargs.get('decoded', False) or hasattr(string, 'raw_string')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue