Revision f83ebc98 snf-cyclades-app/synnefo/management/common.py
b/snf-cyclades-app/synnefo/management/common.py | ||
---|---|---|
52 | 52 |
return 'YES' if b else 'NO' |
53 | 53 |
|
54 | 54 |
|
55 |
def parse_bool(string): |
|
56 |
if string == "True": |
|
57 |
return True |
|
58 |
elif string == "False": |
|
59 |
return False |
|
60 |
else: |
|
61 |
raise Exception("Can not parse string %s to bool" % string) |
|
62 |
|
|
63 |
|
|
64 |
|
|
55 | 65 |
def format_date(d): |
56 | 66 |
if not d: |
57 | 67 |
return '' |
Also available in: Unified diff