MCPcopy
hub / github.com/saltstack/salt / update_metadata

Method update_metadata

setup.py:904–919  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

902 self.update_metadata()
903
904 def update_metadata(self):
905 for attrname in dir(self):
906 if attrname.startswith("__"):
907 continue
908 attrvalue = getattr(self, attrname, None)
909 if attrvalue == 0:
910 continue
911 if attrname == "salt_version":
912 attrname = "version"
913 if hasattr(self.metadata, f"set_{attrname}"):
914 getattr(self.metadata, f"set_{attrname}")(attrvalue)
915 elif hasattr(self.metadata, attrname):
916 try:
917 setattr(self.metadata, attrname, attrvalue)
918 except AttributeError:
919 pass
920
921 def discover_packages(self):
922 modules = []

Callers 1

__init__Method · 0.95

Calls 1

dirFunction · 0.85

Tested by

no test coverage detected