config('key') returns a difficult object
Bug #1182959 reported by
Stuart Bishop
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
The Serializable class returned by config() needs work. In particular, it doesn't implement __str__ allowing it to be used in string contexts like 'subprocess.
Related branches
lp:~stub/charm-helpers/bug-1182959-no-implicit-serializable-magic
- Matthew Wedgwood (community): Approve
- Charm Helper Maintainers: Pending requested
-
Diff: 187 lines (+58/-32)2 files modifiedcharmhelpers/core/hookenv.py (+10/-14)
tests/core/test_hookenv.py (+48/-18)
lp:~stub/charm-helpers/bug-1192845-fix-serializable
- Adam Gandelman (community): Approve
-
Diff: 114 lines (+51/-4)2 files modifiedcharmhelpers/core/hookenv.py (+18/-4)
tests/core/test_hookenv.py (+33/-0)
Changed in charm-helpers: | |
status: | New → Confirmed |
importance: | Undecided → Low |
importance: | Low → Wishlist |
Changed in charm-helpers: | |
status: | Confirmed → Fix Committed |
Changed in charm-helpers: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Real problem here is that Serializable can only wrap dictionaries, and was being used to wrap string results (the juju helpers return single strings if there is a scope, or a dictionary of the whole dataset).