Code Duplication    Length = 12-12 lines in 2 locations

ssg/build_yaml.py 2 locations

@@ 975-986 (lines=12) @@
972
            data["platforms"].add(data["platform"])
973
        return data
974
975
    def load_entities(self, rules_by_id, values_by_id, groups_by_id):
976
        for rid, val in self.rules.items():
977
            if not val:
978
                self.rules[rid] = rules_by_id[rid]
979
980
        for vid, val in self.values.items():
981
            if not val:
982
                self.values[vid] = values_by_id[vid]
983
984
        for gid, val in self.groups.items():
985
            if not val:
986
                self.groups[gid] = groups_by_id[gid]
987
988
    def represent_as_dict(self):
989
        yaml_contents = super(Group, self).represent_as_dict()
@@ 755-766 (lines=12) @@
752
753
        self.add_value(conditional_clause)
754
755
    def load_entities(self, rules_by_id, values_by_id, groups_by_id):
756
        for rid, val in self.rules.items():
757
            if not val:
758
                self.rules[rid] = rules_by_id[rid]
759
760
        for vid, val in self.values.items():
761
            if not val:
762
                self.values[vid] = values_by_id[vid]
763
764
        for gid, val in self.groups.items():
765
            if not val:
766
                self.groups[gid] = groups_by_id[gid]
767
768
    @classmethod
769
    def process_input_dict(cls, input_contents, env_yaml):