예제 #1
0
 def get_config_version_mismatch(self) -> bool:
     """
     TODO: Docu
     """
     cfg1 = Config("config/easywall.sample.ini")
     cfg2 = Config("config/easywall.ini")
     for section in cfg1.get_sections():
         if section not in cfg2.get_sections():
             return True
         for key in cfg1.get_keys(section):
             if key not in cfg2.get_keys(section):
                 return True
     return False
예제 #2
0
 def get_config_version_mismatch(self, cfgtype: str) -> bool:
     """TODO: Doku."""
     if cfgtype == "core":
         cfg1 = Config("config/easywall.sample.ini")
         cfg2 = Config("config/easywall.ini")
     elif cfgtype == "web":
         cfg1 = Config("config/web.sample.ini")
         cfg2 = Config("config/web.ini")
     for section in cfg1.get_sections():
         if section not in cfg2.get_sections():
             return True
         for key in cfg1.get_keys(section):
             if key not in cfg2.get_keys(section):
                 return True
     return False