Fixing a few mistakes

This commit is contained in:
Vishal 2024-04-29 03:22:29 +05:30 committed by GitHub
parent 0092f0fc04
commit 5af504e9ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 13 deletions

View file

@ -1407,14 +1407,14 @@ class PluginManager:
self._changelog_setup_in_progress = not bool(self._changelog)
try:
full_changelog = await self.get_changelog()
pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)"
matches = re.findall(pattern, full_changelog, re.DOTALL)
if matches:
changelog = matches[0].strip()
else:
changelog = f"Changelog entry for version {version} not found."
except urllib.error.URLError:
full_changelog = 'Could not get ChangeLog due to Internet Issues'
pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)"
matches = re.findall(pattern, full_changelog, re.DOTALL)
if matches:
changelog = matches[0].strip()
else:
changelog = f"Changelog entry for version {version} not found."
changelog = 'Could not get ChangeLog due to Internet Issues.'
self.set_changelog_global_cache(changelog)
self._changelog_setup_in_progress = False