Split endoflife.date and releasedata models in separate files (#276)
This makes the code easier to read.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from common import dates, endoflife, http
|
||||
from common import dates, endoflife, http, releasedata
|
||||
|
||||
"""Fetches versions from repositories managed with cgit, such as the Linux kernel repository.
|
||||
Ideally we would want to use the git repository directly, but cgit-managed repositories don't support partial clone."""
|
||||
@@ -10,7 +10,7 @@ METHOD = "cgit"
|
||||
|
||||
p_filter = sys.argv[1] if len(sys.argv) > 1 else None
|
||||
for product_name in endoflife.list_products(METHOD, p_filter):
|
||||
product = endoflife.Product(product_name)
|
||||
product = releasedata.Product(product_name)
|
||||
product_frontmatter = endoflife.ProductFrontmatter(product.name)
|
||||
for auto_config in product_frontmatter.get_auto_configs(METHOD):
|
||||
response = http.fetch_url(auto_config.url + '/refs/tags')
|
||||
|
||||
Reference in New Issue
Block a user