mirror of
https://github.com/pypiserver/pypiserver
synced 2025-02-22 19:19:37 +01:00
Added authentication by pam and fixed some pep8 complaints
This commit is contained in:
parent
0e3da62a5b
commit
c652891523
@ -91,6 +91,10 @@ def auth_by_htpasswd_file(htPsswdFile, username, password):
|
|||||||
return htPsswdFile.check_password(username, password)
|
return htPsswdFile.check_password(username, password)
|
||||||
|
|
||||||
|
|
||||||
|
def auth_by_pam(username, password):
|
||||||
|
import pam
|
||||||
|
return pam.authenticate(username, password)
|
||||||
|
|
||||||
|
|
||||||
mimetypes.add_type("application/octet-stream", ".egg")
|
mimetypes.add_type("application/octet-stream", ".egg")
|
||||||
mimetypes.add_type("application/octet-stream", ".whl")
|
mimetypes.add_type("application/octet-stream", ".whl")
|
||||||
@ -250,6 +254,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
listdir = _listdir
|
listdir = _listdir
|
||||||
|
|
||||||
|
|
||||||
def find_packages(pkgs, prefix=""):
|
def find_packages(pkgs, prefix=""):
|
||||||
prefix = normalize_pkgname(prefix)
|
prefix = normalize_pkgname(prefix)
|
||||||
for x in pkgs:
|
for x in pkgs:
|
||||||
|
Loading…
Reference in New Issue
Block a user