~james-page/charms/trusty/odl-controller/doc-updates

« back to all changes in this revision

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

  • Committer: Liam Young
  • Date: 2015-07-22 12:10:31 UTC
  • Revision ID: liam.young@canonical.com-20150722121031-s30zhvycvv09rgho
Charmhelper sync

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)