fetch.configure_sources() breaks with 0 extra sources
Bug #1269780 reported by
Stuart Bishop
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
fetch.configure
install_sources: ""
install_keys: ""
The problem is that yaml.safe_load("") returns None, not "", and the subsequent len() call fails.
Related branches
lp:~aglenyoung/charm-helpers/charm-helpers-no-source
Rejected
for merging
into
lp:charm-helpers
- Stuart Bishop (community): Needs Information
- Charm Helper Maintainers: Pending requested
-
Diff: 34 lines (+13/-0)2 files modifiedcharmhelpers/fetch/__init__.py (+2/-0)
tests/fetch/test_fetch.py (+11/-0)
lp:~stub/charm-helpers/fix-configure_sources
- David Britton (community): Approve
-
Diff: 118 lines (+64/-21)2 files modifiedcharmhelpers/fetch/__init__.py (+17/-3)
tests/fetch/test_fetch.py (+47/-18)
Changed in charm-helpers: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Stuart Bishop (stub) |
Changed in charm-helpers: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
=== modified file 'hooks/ charmhelpers/ fetch/_ _init__ .py' ers/fetch/ __init_ _.py 2013-09-24 11:09:35 +0000 ers/fetch/ __init_ _.py 2014-01-16 12:20:51 +0000
--- hooks/charmhelp
+++ hooks/charmhelp
@@ -117,8 +117,8 @@
Note that 'null' (a.k.a. None) should not be quoted. config( sources_ var)) config( keys_var) ) config( sources_ var)) or [] config( keys_var) ) or []
add_source( sources, keys)
"""
- sources = safe_load(
- keys = safe_load(
+ sources = safe_load(
+ keys = safe_load(
if isinstance(sources, basestring) and isinstance(keys, basestring):
else: