Traceback when the credentials storage returns unicode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Fix Released
|
Low
|
Brad Crittenden | ||
python-launchpadlib (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Natty |
Fix Released
|
Undecided
|
Unassigned | ||
Oneiric |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In credentials.py there is this line:
credentials.
When value is unicide (which is what is returned from kwallet) then the StringIO object contains gibberish as far as the parser is concerned and it blows up like this:
File "/home/
credentials
File "/home/
parser.
File "/usr/lib/
File "/usr/lib/
ConfigParser.
[line 6]: '\x00\x00\x00\n'
[line 7]: '\x00\x00\x00'
Related branches
- j.c.sackett (community): Approve
-
Diff: 46 lines (+19/-1)3 files modifiedsrc/launchpadlib/credentials.py (+1/-0)
src/launchpadlib/launchpad.py (+0/-1)
src/launchpadlib/tests/test_credential_store.py (+18/-0)
Changed in launchpadlib: | |
assignee: | nobody → Julian Edwards (julian-edwards) |
status: | Triaged → In Progress |
Changed in launchpadlib: | |
assignee: | nobody → Brad Crittenden (bac) |
status: | Triaged → In Progress |
Changed in launchpadlib: | |
status: | In Progress → Fix Committed |
Changed in launchpadlib: | |
status: | Fix Committed → Fix Released |
Changed in python-launchpadlib (Ubuntu): | |
status: | New → Fix Released |
The fix is to change the line to this:
credentials. load(StringIO( value.encode( "utf8") ))