Specifying the exception

This commit is contained in:
Vishal 2024-04-29 02:50:00 +05:30 committed by GitHub
parent f93afa90d0
commit 9936e76587
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 8 deletions

View file

@ -1407,8 +1407,8 @@ class PluginManager:
self._changelog_setup_in_progress = not bool(self._changelog)
try:
full_changelog = await self.get_changelog()
except Exception:
full_changelog = 'Could not get ChangeLog'
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: