def __call__()

in components/processing/libs/processor-msg/src/processors/msg/run.py [0:0]


    def __call__(self, parser, namespace, values, option_string=None, *args, **kwargs):
        # if this is the first time we call this, we need to make sure that
        # the namespace contains a dict for our `dest`
        if not hasattr(namespace, self.dest) or not getattr(namespace, self.dest):
            setattr(namespace, self.dest, dict())
        # for each key-value pair, parse the key-value (seperated by an equal
        # sign), validate the key (starts with a dot) and store in the dict
        for value in values:
            key, value = list(map(lambda x: x.strip(), value.split(":")))
            if not key.startswith("."):
                key = "." + key
            getattr(namespace, self.dest)[key] = value