Exemple #1
0
    def checkDiff(self):
        """ Don't use.
        Check if there is a difference - returns True if so, and False
        if no changes present. Also updates widget with overview of the
        differences if requested with updateGUI
        """
        self.saveTraceManager()

        disk = util.convert_to_str(ConfigObjProj(infile=self.filename))
        ram = util.convert_to_str(self.config)
Exemple #2
0
    def checkDiff(self):
        """
        Check if there is a difference - returns True if so, and False
        if no changes present. Also updates widget with overview of the
        differences if requested with updateGUI
        """
        self.saveTraceManager()

        disk = util.convert_to_str(ConfigObjProj(infile=self.filename))
        ram = util.convert_to_str(self.config)
        diff = DictDiffer(ram, disk)

        added = diff.added()
        removed = diff.removed()
        changed = diff.changed() #TODO: bug when comparing projects with template sections. It is returning changes when there is not.

        return added, removed, changed
Exemple #3
0
 def checkDataConfig(self, config, requiredSettings):
     """Check a configuration section for various settings. Don't use."""
     requiredSettings = util.convert_to_str(requiredSettings)
     config = util.convert_to_str(config)
     return set(requiredSettings.items()).issubset(set(config.items()))
Exemple #4
0
 def checkDataConfig(self, config, requiredSettings):
     """Check a configuration section for various settings"""
     requiredSettings = util.convert_to_str(requiredSettings)
     config = util.convert_to_str(config)
     return set(requiredSettings.items()).issubset(set(config.items()))