~hopem/charms/trusty/nova-cloud-controller/grizzly

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/core/strutils.py

[beisner,r=james-page] Resync helpers, switch to next branches for testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
    value = value.strip().lower()
35
35
 
36
 
    if value in ['y', 'yes', 'true', 't']:
 
36
    if value in ['y', 'yes', 'true', 't', 'on']:
37
37
        return True
38
 
    elif value in ['n', 'no', 'false', 'f']:
 
38
    elif value in ['n', 'no', 'false', 'f', 'off']:
39
39
        return False
40
40
 
41
41
    msg = "Unable to interpret string value '%s' as boolean" % (value)