mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Improve handling of plugin metadata reading (#9816)
* Improve handling of plugin metadata reading * Accessor fix
This commit is contained in:
@ -442,15 +442,15 @@ class InvenTreePlugin(VersionMixin, MixinBase, MetaBase):
|
||||
|
||||
try:
|
||||
website = meta['Project-URL'].split(', ')[1]
|
||||
except (ValueError, IndexError, AttributeError):
|
||||
website = meta['Project-URL']
|
||||
except Exception:
|
||||
website = meta.get('Project-URL')
|
||||
|
||||
return {
|
||||
'author': meta['Author-email'],
|
||||
'description': meta['Summary'],
|
||||
'version': meta['Version'],
|
||||
'author': meta.get('Author-email'),
|
||||
'description': meta.get('Summary'),
|
||||
'version': meta.get('Version'),
|
||||
'website': website,
|
||||
'license': meta['License'],
|
||||
'license': meta.get('License'),
|
||||
}
|
||||
|
||||
def define_package(self):
|
||||
|
Reference in New Issue
Block a user