Exception messages not complete when containing unicode strings
Bug #1235228 reported by
Sylvain Afchain
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Low
|
Akihiro Motoki |
Bug Description
There is an exception during the formatting of exception messages when values contain unicode strings.
ex:
Connection to neutron failed: %(reason)s
Due to this issue, the exception message is the unformatted message.
neutronclient/
37 try:
38 self._error_string = self.message % kwargs
39
40 except Exception:
41 # at least get the core message out if something happened
42 self._error_string = self.message
Changed in python-neutronclient: | |
assignee: | nobody → Harikrishna (harikrishna-mallavolu) |
Changed in python-neutronclient: | |
assignee: | Harikrishna (harikrishna-mallavolu) → usha rani veepuri (usha-veepuri) |
Changed in python-neutronclient: | |
assignee: | usha veepuri (usha-veepuri) → Elena Ezhova (eezhova) |
Changed in python-neutronclient: | |
assignee: | Elena Ezhova (eezhova) → nobody |
tags: | added: needs-attention |
tags: | added: usability |
tags: | added: low-hanging-fruit |
Changed in python-neutronclient: | |
assignee: | nobody → Suraj Deshmukh (surajssd009005) |
Changed in python-neutronclient: | |
assignee: | Suraj Deshmukh (surajssd009005) → nobody |
Changed in python-neutronclient: | |
assignee: | nobody → Mannu (mannu-ray) |
Changed in python-neutronclient: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in python-neutronclient: | |
assignee: | nobody → Akihiro Motoki (amotoki) |
status: | Expired → In Progress |
To post a comment you must log in.
It rarely happens in the current neutronclient code, but it happens.
In [1]: from neutronclient. common import exceptions as nexc
In [2]: unicode_str = 'あああ'
In [3]: unicode_str x82\xe3\ x81\x82\ xe3\x81\ x82'
Out[4]: '\xe3\x81\
In [4]: e = nexc.Connection Failed( reason= unicode_ str)
In [5]: print e
Connection to neutron failed: %(reason)s