Ticket #2465 (closed defect: fixed)
[PATCH] tg.util get_partial_dict() doesn't work correctly.
| Reported by: | Tomoyuki Kano | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 2.1b1 |
| Component: | TurboGears | Version: | 2.1 |
| Severity: | critical | Keywords: | |
| Cc: |
Description
here is a miss understanding of string.lstrip().
>>> from tg.util import get_partial_dict
>>> get_partial_dict('pre', {'pre.xyz':1, 'pre.pxy': 2, 'pre.erpzyx': 4, 'xy': 3})
{'xyz': 1, 'xy': 2, 'zyx': 4}
>>>
Attachments
Change History
comment:1 Changed 2 years ago by lmacken
- Status changed from new to closed
- Resolution set to fixed
I added a unit test that reproduces the bug: http://bitbucket.org/turbogears/tg-dev/changeset/ebea49e8818a and I applied your fix in: http://bitbucket.org/turbogears/tg-dev/changeset/d682e882969c
Thanks for the patch, Tomoyuki!
Note: See
TracTickets for help on using
tickets.
