Append a member to a metadata array entry

def iscm_md_append_array(self, arraypath, member):
        """
        Append a member to a metadata array entry
        """
        array_path = string.split(arraypath, ".")
        array_key = array_path.pop()
        current = self.metadata
        for k in array_path:
            if not current.has_key(k):
                current[k] = {}
            current = current[k]
        if not current.has_key(array_key):
            current[array_key] = []
        if not type(current[array_key]) == list:
            raise KeyError("%s doesn't point to an array" % arraypath)
        current[array_key].append(member)