Commit 83d8d941 authored by Tres Seaver's avatar Tres Seaver

Fix sorting.

parent dc8b1c39
...@@ -61,8 +61,7 @@ def cat(dir, *names): ...@@ -61,8 +61,7 @@ def cat(dir, *names):
def ls(dir, *subs): def ls(dir, *subs):
if subs: if subs:
dir = os.path.join(dir, *subs) dir = os.path.join(dir, *subs)
names = os.listdir(dir) names = sorted(os.listdir(dir))
names.sort()
for name in names: for name in names:
if os.path.isdir(os.path.join(dir, name)): if os.path.isdir(os.path.join(dir, name)):
print_('d ', end=' ') print_('d ', end=' ')
...@@ -366,8 +365,7 @@ class Handler(BaseHTTPRequestHandler): ...@@ -366,8 +365,7 @@ class Handler(BaseHTTPRequestHandler):
self.send_response(200) self.send_response(200)
if os.path.isdir(path): if os.path.isdir(path):
out = ['<html><body>\n'] out = ['<html><body>\n']
names = os.listdir(path) names = sorted(os.listdir(path))
names.sort()
for name in names: for name in names:
if os.path.isdir(os.path.join(path, name)): if os.path.isdir(os.path.join(path, name)):
name += '/' name += '/'
......
...@@ -816,8 +816,8 @@ On the other hand, if we have a regular egg, rather than a develop egg: ...@@ -816,8 +816,8 @@ On the other hand, if we have a regular egg, rather than a develop egg:
- zc.recipe.egg.egg-link - zc.recipe.egg.egg-link
>>> ls('eggs') # doctest: +ELLIPSIS >>> ls('eggs') # doctest: +ELLIPSIS
- setuptools.eggpyN.N.egg
- foox-0.0.0-py2.4.egg - foox-0.0.0-py2.4.egg
- setuptools.eggpyN.N.egg
... ...
We do not get a warning, but we do get setuptools included in the working set: We do not get a warning, but we do get setuptools included in the working set:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment