Skip to content
Snippets Groups Projects
Commit 574f7104 authored by sveseli's avatar sveseli
Browse files

add conversion utility

parent f0b699ae
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
class ValueUtility:
@classmethod
def toBoolean(cls, value):
if value is None:
return False
if str(value).lower() == 'true':
return True
return False
#######################################################################
# Testing.
if __name__ == '__main__':
print ValueUtility.toBoolean('True')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment