Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/config.py @ 723:c17a4e30ebbf
Docs for nested filters
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Wed, 16 Aug 2023 17:04:14 +0200 |
| parents | ea1a6beadc6c |
| children | 75d37575472b |
comparison
equal
deleted
inserted
replaced
| 722:ea1a6beadc6c | 723:c17a4e30ebbf |
|---|---|
| 1029 | 1029 |
| 1030 if ((len_s >= 6) | 1030 if ((len_s >= 6) |
| 1031 and (s[2] == _FILTER_SEPARATOR) | 1031 and (s[2] == _FILTER_SEPARATOR) |
| 1032 and (start == 0)): | 1032 and (start == 0)): |
| 1033 if s.find(_ENDTOK_FILTER, 3) != (len_s - 3): | 1033 if s.find(_ENDTOK_FILTER, 3) != (len_s - 3): |
| 1034 raise ValueError("`{{|' global filter interpolation must end with `|}}'") | 1034 raise ValueError("`{{|' nested filter interpolation must end with `|}}'") |
| 1035 new_s, filters = _split_filters(s[3:-3], -1) | 1035 new_s, filters = _split_filters(s[3:-3], -1) |
| 1036 try: | 1036 try: |
| 1037 varvalue = self.py_interpolate_variables(new_s) | 1037 varvalue = self.py_interpolate_variables(new_s) |
| 1038 except KeyError: | 1038 except KeyError: |
| 1039 if NONE_FILTER in filters: | 1039 if NONE_FILTER in filters: |
