Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from common import dates, http, releasedata
|
||||
from common import dates, http
|
||||
from common.releasedata import ProductData, config_from_argv
|
||||
|
||||
"""Fetches pan-os versions from https://github.com/mrjcap/panos-versions/."""
|
||||
|
||||
for config in releasedata.list_configs_from_argv():
|
||||
with releasedata.ProductData(config.product) as product_data:
|
||||
versions = http.fetch_json(config.url)
|
||||
config = config_from_argv()
|
||||
with ProductData(config.product) as product_data:
|
||||
versions = http.fetch_json(config.url)
|
||||
|
||||
for version in versions:
|
||||
name = version['version']
|
||||
date = dates.parse_datetime(version['released-on'])
|
||||
product_data.declare_version(name, date)
|
||||
for version in versions:
|
||||
name = version['version']
|
||||
date = dates.parse_datetime(version['released-on'])
|
||||
product_data.declare_version(name, date)
|
||||
|
||||
Reference in New Issue
Block a user