support findpkg

This commit is contained in:
lyon 2023-01-29 12:53:50 +08:00
parent 441ae6a1f8
commit 4d1c420ae1

View File

@ -140,3 +140,9 @@ class PackageReleaseList:
with open(file_path, "w") as f:
# dump with formating
toml.dump(self.pkg_dict, f)
def findPackage(self, pkg_name:str):
for package in self.packages:
if package.name == pkg_name:
return package
return None