Functions | |
def | _check_type |
Private functions. | |
def | date_to_dict |
Public API functions. | |
def | get_direct_child_elements_xml |
def | indent_string |
def | parse_properties_xml |
def | properties_to_xml |
def | validate_attribute |
Variables | |
string | __version__ = '$Revision: $' |
def rtsprofile.utils._check_type | ( | value, | |
expected_types | |||
) | [private] |
def rtsprofile.utils.date_to_dict | ( | date | ) |
def rtsprofile.utils.get_direct_child_elements_xml | ( | node, | |
prefix = None , |
|||
local_name = None |
|||
) |
def rtsprofile.utils.indent_string | ( | string, | |
num_spaces = 2 |
|||
) |
def rtsprofile.utils.parse_properties_xml | ( | node | ) |
def rtsprofile.utils.properties_to_xml | ( | element, | |
name, | |||
value = None |
|||
) |
def rtsprofile.utils.validate_attribute | ( | attr, | |
name, | |||
expected_type = None , |
|||
required = False |
|||
) |
Validates that an attribute meets expectations. This function will check if the given attribute value matches a necessary type and/or is not None, an empty string, an empty list, etc. It will raise suitable exceptions on validation failure. @param attr The value to validate. @param name The attribute name to use in exceptions. @param expected_type The type the value must be. If None, no check is performed. If a list, attr must match one type in the list. @param required If the value must not be empty, e.g. not an empty string. @raises InvalidTypeError @raises RequiredAttributeError
string rtsprofile::utils::__version__ = '$Revision: $' |