OLD | NEW |
1 # -*- coding: ascii -*- | 1 # -*- coding: ascii -*- |
2 # | 2 # |
3 # Copyright 2007, 2008, 2009, 2010, 2011 | 3 # Copyright 2007, 2008, 2009, 2010, 2011 |
4 # Andr\xe9 Malo or his licensors, as applicable | 4 # Andr\xe9 Malo or his licensors, as applicable |
5 # | 5 # |
6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
9 # | 9 # |
10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 :Return: The boolean value | 64 :Return: The boolean value |
65 :Rtype: ``bool`` | 65 :Rtype: ``bool`` |
66 | 66 |
67 :Exceptions: | 67 :Exceptions: |
68 - `ValueError` : The value could not be recognized | 68 - `ValueError` : The value could not be recognized |
69 """ | 69 """ |
70 try: | 70 try: |
71 return _util.strtobool(str(value).strip().lower() or 'no') | 71 return _util.strtobool(str(value).strip().lower() or 'no') |
72 except ValueError: | 72 except ValueError: |
73 raise ValueError("Unrecognized config value: %s = %s" % (name, value)) | 73 raise ValueError("Unrecognized config value: %s = %s" % (name, value)) |
OLD | NEW |