-def _get_strtuple_prop(rules, field):
- """ Return the given field of the rules dictionary as a list.
-
- If the field is not defined or empty, returns None. If the field is
- a singe string, it is converted into a tuple with a single element.
- If the field is a list of strings, return as a string tuple.
- Raise a usage error in all other cases.
- """
- value = rules.get(field)
-
- if not value:
- return None
-
- if isinstance(value, str):
- return (value,)