~wesmason/charms/trusty/conn-check/trunk-use-bool

« back to all changes in this revision

Viewing changes to filter_plugins/is_true.py

  • Committer: Wes Mason
  • Date: 2015-04-29 10:05:56 UTC
  • Revision ID: wesley.mason@canonical.com-20150429100556-2bkg3tk92bvrhcbn
Add description to is_true filter

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        }
7
7
 
8
8
    def is_true(self, s):
 
9
        # We need this for testing ansible playbook flags, as they're passed
 
10
        # through as strings rather than the actual bool value
9
11
        return bool(str(s).strip().lower() == 'true')