Sort SET components by tag Sort regardless of the Choice value (static sort)
(componentAndType)
| 144 | class SetEncoder(encoder.SequenceEncoder): |
| 145 | @staticmethod |
| 146 | def _componentSortKey(componentAndType): |
| 147 | """Sort SET components by tag |
| 148 | |
| 149 | Sort regardless of the Choice value (static sort) |
| 150 | """ |
| 151 | component, asn1Spec = componentAndType |
| 152 | |
| 153 | if asn1Spec is None: |
| 154 | asn1Spec = component |
| 155 | |
| 156 | if asn1Spec.typeId == univ.Choice.typeId and not asn1Spec.tagSet: |
| 157 | if asn1Spec.tagSet: |
| 158 | return asn1Spec.tagSet |
| 159 | else: |
| 160 | return asn1Spec.componentType.minTagSet |
| 161 | else: |
| 162 | return asn1Spec.tagSet |
| 163 | |
| 164 | def encodeValue(self, value, asn1Spec, encodeFun, **options): |
| 165 |
nothing calls this directly
no outgoing calls
no test coverage detected