Merge lp:~thedac/charm-helpers/volume-fixes into lp:charm-helpers

Proposed by David Ames
Status: Merged
Merged at revision: 38
Proposed branch: lp:~thedac/charm-helpers/volume-fixes
Merge into: lp:charm-helpers
Diff against target: 23 lines (+3/-3)
1 file modified
charmhelpers/contrib/charmsupport/volumes.py (+3/-3)
To merge this branch: bzr merge lp:~thedac/charm-helpers/volume-fixes
Reviewer Review Type Date Requested Status
Matthew Wedgwood (community) Approve
Review via email: mp+172392@code.launchpad.net

Description of the change

Fix volume_map dictionary check. Correct hookenv and host imports in volumes.py

To post a comment you must log in.
Revision history for this message
Matthew Wedgwood (mew) wrote :

Thanks, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/charmsupport/volumes.py'
--- charmhelpers/contrib/charmsupport/volumes.py 2013-05-11 20:24:29 +0000
+++ charmhelpers/contrib/charmsupport/volumes.py 2013-07-01 18:48:23 +0000
@@ -40,8 +40,8 @@
40# - fstab is neither consulted nor updated40# - fstab is neither consulted nor updated
4141
42import os42import os
43import hookenv43from charmhelpers.core import hookenv
44import host44from charmhelpers.core import host
45import yaml45import yaml
4646
4747
@@ -74,7 +74,7 @@
74 if volume_map is None:74 if volume_map is None:
75 # probably an empty string75 # probably an empty string
76 volume_map = {}76 volume_map = {}
77 elif isinstance(volume_map, dict):77 elif not isinstance(volume_map, dict):
78 hookenv.log("Volume-map should be a dictionary, not {}".format(78 hookenv.log("Volume-map should be a dictionary, not {}".format(
79 type(volume_map)))79 type(volume_map)))
80 errors = True80 errors = True

Subscribers

People subscribed via source and target branches