Skip to content

Commit aa2031d

Browse files
pombredannesbs2001
authored andcommitted
Format code to get shorter lines
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 253f2a0 commit aa2031d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

vulnerabilities/importers/ubuntu.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ def __init__(self, *args, **kwargs):
5858
self.pkg_manager_api = LaunchpadVersionAPI()
5959

6060
def _fetch(self):
61+
base_url = 'https://people.canonical.com/~ubuntu-security/oval'
6162
releases = self.config.releases
6263
for i, release in enumerate(releases, 1):
63-
file_url = f"https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.{release}.cve.oval.xml.bz2" # nopep8
64+
file_url = f"{base_url}/com.ubuntu.{release}.cve.oval.xml.bz2" # nopep8
6465
# if not create_etag(data_src=self, url=file_url, etag_key="ETag"):
6566
# print(f"Ubuntu Oval Etag not changed, not re-fetching: {file_url}")
6667
# continue
@@ -77,7 +78,7 @@ def _fetch(self):
7778
ET.ElementTree(ET.fromstring(extracted.decode("utf-8"))),
7879
)
7980

80-
print(f"Fetched {i} Ubuntu Oval releases https://people.canonical.com/~ubuntu-security/oval/") # nopep8
81+
print(f"Fetched {i} Ubuntu Oval releases from {base_url}")
8182

8283
def set_api(self, packages):
8384
asyncio.run(self.pkg_manager_api.load_api(packages))

0 commit comments

Comments
 (0)