Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

0.5.0
-----

* Add trailing slash to package directory links at the root index. Useful, for example,
with nginx proxy configurations, such as using the `ngx_aws_auth` module, where
directory paths can't be detected by the server.

0.4.0
-----

Expand Down
2 changes: 1 addition & 1 deletion pypiprivate/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.4.0'
__version__ = '0.5.0'
7 changes: 5 additions & 2 deletions pypiprivate/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ def join_path(self, *args):
def listdir(self, path):
path = self.join_path(self.base_path, path)
try:
return os.listdir(path)
entries = os.listdir(path)
except OSError as e:
if e.errno == errno.ENOENT:
raise PathNotFound('Path {0} not found'.format(path))
raise e
return [
('{}/'.format(entry) if os.path.isdir(entry) else entry)
for entry in entries]

def path_exists(self, path):
path = self.join_path(self.base_path, path)
Expand Down Expand Up @@ -150,7 +153,7 @@ def listdir(self, path):
raise PathNotFound('Path {0} not found'.format(s3_prefix))
files = (c['Key'][len(s3_prefix):] for c in file_objs)
files = [f for f in files if f != '']
dirs = [cp['Prefix'][len(s3_prefix):].rstrip('/') for cp in dir_objs]
dirs = [cp['Prefix'][len(s3_prefix):] for cp in dir_objs]
return files + dirs

def path_exists(self, path):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py34, py36
envlist = py27, py34, py37

[testenv:py36]
commands = pytest -v tests/
Expand Down