params.py (13675:afeab32b3655) params.py (13697:8d4afe1c365e)
1# Copyright (c) 2012-2014, 2017, 2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 815 unchanged lines hidden (view full) ---

824 def getValue(self):
825 return bool(self.value)
826
827 def __str__(self):
828 return str(self.value)
829
830 # implement truth value testing for Bool parameters so that these params
831 # evaluate correctly during the python configuration phase
1# Copyright (c) 2012-2014, 2017, 2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 815 unchanged lines hidden (view full) ---

824 def getValue(self):
825 return bool(self.value)
826
827 def __str__(self):
828 return str(self.value)
829
830 # implement truth value testing for Bool parameters so that these params
831 # evaluate correctly during the python configuration phase
832 def __nonzero__(self):
832 def __bool__(self):
833 return bool(self.value)
834
833 return bool(self.value)
834
835 # Python 2.7 uses __nonzero__ instead of __bool__
836 __nonzero__ = __bool__
837
835 def ini_str(self):
836 if self.value:
837 return 'true'
838 return 'false'
839
840 def config_value(self):
841 return self.value
842

--- 1264 unchanged lines hidden ---
838 def ini_str(self):
839 if self.value:
840 return 'true'
841 return 'false'
842
843 def config_value(self):
844 return self.value
845

--- 1264 unchanged lines hidden ---