comparison configmix/config.py @ 708:e692216f8756

Allow also "," characters to act as a separator within a filter-chain. The first filter is introduced by a "|", optional other ones may be introduced by a "|" or a ",".
author Franz Glasner <f.glasner@feldmann-mg.com>
date Tue, 15 Aug 2023 11:14:51 +0200
parents 10fbc23b4dba
children 6557cf9ecea5
comparison
equal deleted inserted replaced
707:10fbc23b4dba 708:e692216f8756
449 raise ValueError("`direction' must be -1 or +1") 449 raise ValueError("`direction' must be -1 or +1")
450 if sep: 450 if sep:
451 filters = filters.strip() 451 filters = filters.strip()
452 if filters: 452 if filters:
453 if direction == 1: 453 if direction == 1:
454 return (name, filters.split(_FILTER_SEPARATOR)) 454 if _FILTER_SEPARATOR_2 in filters:
455 return (name, filters.split(_FILTER_SEPARATOR_2))
456 else:
457 return (name, filters.split(_FILTER_SEPARATOR))
455 else: 458 else:
456 return (name, filters.split(_FILTER_SEPARATOR_2)) 459 return (name, filters.split(_FILTER_SEPARATOR_2))
457 else: 460 else:
458 return (name, []) 461 return (name, [])
459 else: 462 else: