Skip to content

Sort directories returned by os.walk - #1

Closed
madsushi wants to merge 1 commit into
sjl:masterfrom
madsushi:master
Closed

madsushi wants to merge 1 commit into
sjl:masterfrom
madsushi:master

Conversation

@madsushi

Copy link
Copy Markdown

When Python returns directories from os.walk (which uses os.listdir),
they are in an arbitrary order on some OSes (Ubuntu, etc) per the Python
documentation. Adding a .sort() in the process resolves this issue,
ensuring that directories are sorted properly and processed in the
correct order.

When Python returns directories from os.walk (which uses os.listdir),
they are in an arbitrary order on some OSes (Ubuntu, etc) per the Python
documentation. Adding a .sort() in the process resolves this issue,
ensuring that directories are sorted properly and processed in the
correct order.
@sjl

sjl commented Nov 24, 2016

Copy link
Copy Markdown
Owner

I've moved to Hugo for my blog, so this repo is basically abandonware at this point, especially since it was a fork of the already-abandoned old version of Hyde.

@sjl sjl closed this Nov 24, 2016
@madsushi

madsushi commented Nov 24, 2016 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants