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
1=== modified file 'charmhelpers/contrib/charmsupport/volumes.py'
2--- charmhelpers/contrib/charmsupport/volumes.py 2013-05-11 20:24:29 +0000
3+++ charmhelpers/contrib/charmsupport/volumes.py 2013-07-01 18:48:23 +0000
4@@ -40,8 +40,8 @@
5 # - fstab is neither consulted nor updated
6
7 import os
8-import hookenv
9-import host
10+from charmhelpers.core import hookenv
11+from charmhelpers.core import host
12 import yaml
13
14
15@@ -74,7 +74,7 @@
16 if volume_map is None:
17 # probably an empty string
18 volume_map = {}
19- elif isinstance(volume_map, dict):
20+ elif not isinstance(volume_map, dict):
21 hookenv.log("Volume-map should be a dictionary, not {}".format(
22 type(volume_map)))
23 errors = True

Subscribers

People subscribed via source and target branches