mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fix another FileNotFoundError in license check
This commit is contained in:
@@ -172,13 +172,17 @@ class LicenseCheckView(StaffMemberRequiredMixin, FormView):
|
||||
pkg = pkgs[0]
|
||||
except:
|
||||
return None, None
|
||||
for line in pkg.get_metadata_lines('PKG-INFO'):
|
||||
if ': ' in line:
|
||||
(k, v) = line.split(': ', 1)
|
||||
if k == "License":
|
||||
license = v
|
||||
if k == "Home-page":
|
||||
url = v
|
||||
try:
|
||||
for line in pkg.get_metadata_lines('PKG-INFO'):
|
||||
if ': ' in line:
|
||||
(k, v) = line.split(': ', 1)
|
||||
if k == "License":
|
||||
license = v
|
||||
if k == "Home-page":
|
||||
url = v
|
||||
except FileNotFoundError:
|
||||
license = '?'
|
||||
url = '?'
|
||||
return license, url
|
||||
|
||||
def _check_results(self, input):
|
||||
|
||||
Reference in New Issue
Block a user