~le-charmers/charms/trusty/hacluster/leadership-election

« back to all changes in this revision

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

  • Committer: james.page at ubuntu
  • Date: 2015-06-09 10:12:12 UTC
  • Revision ID: james.page@ubuntu.com-20150609101212-zz5xj34v2rho4hgi
Resync helpers

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)