forked from CGM_Public/pretix_original
Fix another FileNotFoundError in license check
This commit is contained in:
@@ -172,13 +172,17 @@ class LicenseCheckView(StaffMemberRequiredMixin, FormView):
|
|||||||
pkg = pkgs[0]
|
pkg = pkgs[0]
|
||||||
except:
|
except:
|
||||||
return None, None
|
return None, None
|
||||||
for line in pkg.get_metadata_lines('PKG-INFO'):
|
try:
|
||||||
if ': ' in line:
|
for line in pkg.get_metadata_lines('PKG-INFO'):
|
||||||
(k, v) = line.split(': ', 1)
|
if ': ' in line:
|
||||||
if k == "License":
|
(k, v) = line.split(': ', 1)
|
||||||
license = v
|
if k == "License":
|
||||||
if k == "Home-page":
|
license = v
|
||||||
url = v
|
if k == "Home-page":
|
||||||
|
url = v
|
||||||
|
except FileNotFoundError:
|
||||||
|
license = '?'
|
||||||
|
url = '?'
|
||||||
return license, url
|
return license, url
|
||||||
|
|
||||||
def _check_results(self, input):
|
def _check_results(self, input):
|
||||||
|
|||||||
Reference in New Issue
Block a user