(case_block)
return DEFAULT_VERSION
Given a case block, determine what version it is.
Given a case block, determine what version it is.
Given a case block determine what version it is .
def get_version(case_block):
    """
    Given a case block, determine what version it is.
    """
    xmlns = case_block.get(XMLNS_ATTR, "")
    if xmlns:
        if xmlns not in NS_REVERSE_LOOKUP_MAP:
            raise CaseGenerationException(
                "%s not a valid case xmlns. "
                "We don't know how to handle this version." % xmlns
            )
        return NS_REVERSE_LOOKUP_MAP[xmlns]
    return DEFAULT_VERSION
def get_version ( case_block ) : xmlns = case_block . get ( XMLNS_ATTR , "" ) if xmlns : if xmlns not in NS_REVERSE_LOOKUP_MAP : raise CaseGenerationException ( "%s not a valid case xmlns. " "We don't know how to handle this version." % xmlns ) return NS_REVERSE_LOOKUP_MAP [ xmlns ] return DEFAULT_VERSION