~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to state/relationunit.go

Merge trunk and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        "labix.org/v2/mgo"
7
7
        "labix.org/v2/mgo/txn"
8
8
        "launchpad.net/juju-core/charm"
9
 
        "launchpad.net/juju-core/trivial"
 
9
        "launchpad.net/juju-core/utils"
10
10
        "strings"
11
11
)
12
12
 
321
321
// guaranteed to persist for the lifetime of the relation, regardless
322
322
// of the lifetime of the unit.
323
323
func (ru *RelationUnit) ReadSettings(uname string) (m map[string]interface{}, err error) {
324
 
        defer trivial.ErrorContextf(&err, "cannot read settings for unit %q in relation %q", uname, ru.relation)
 
324
        defer utils.ErrorContextf(&err, "cannot read settings for unit %q in relation %q", uname, ru.relation)
325
325
        if !IsUnitName(uname) {
326
326
                return nil, fmt.Errorf("%q is not a valid unit name", uname)
327
327
        }