diff --git a/osc/core.py b/osc/core.py index 83a75651..3548fe3e 100644 --- a/osc/core.py +++ b/osc/core.py @@ -276,6 +276,18 @@ class File: } return cls(**kwargs) + def to_xml_node(self, parent_node): + attributes = { + "name": self.name, + "md5": self.md5, + "size": str(int(self.size)), + "mtime": str(int(self.mtime)), + } + if self.skipped: + attributes["skipped"] = "true" + new_node = ET.SubElement(parent_node, "entry", attributes) + return new_node + class Serviceinfo: """Source service content