INNER CODE UNIT · Python

diff

weaveworks/kubediff · kubedifflib/_diff.py:250

    def diff(self, path, difference):
        self.data[path].append(difference.to_text())

    def finish(self):
        print(json.dumps(self.data, sort_keys=True, indent=2, separators=(',', ': ')))


def check_files(paths, printer, config):
    """Check all files in 'paths' for differences to a Kubernetes cluster.

    :param printer: Where differences are reported to as they are found.
    :param dict config: Contains Kubernetes parsing and access configuration.
    :return: True if there are differences, False otherwise.
    """
    differences = 0
    for path in iter_files(paths):
        _, extension = os.path.splitext(path)
        if extension not in [".yaml", ".yml"]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…