[ovs-dev] [PATCH] ovs-bugtool: Add ability to prioritize files by date.
Raju Subramanian
rsubramanian at nicira.com
Fri Mar 23 20:37:53 UTC 2012
On Fri, Mar 23, 2012 at 1:28 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, Mar 23, 2012 at 01:22:54PM -0700, Raju Subramanian wrote:
> > > The tree_output function is documented as processing files less nested
> > > in the directory tree before those deeper in the directory tree. It
> > > doesn't do that anymore, so you should update the documentation.
> > >
> > >
> > I don't see any documentation about tree_output previous to my change.
> Are
> > you referring to this snippet in the file?
> > """
> > Walks the directory tree rooted at path. Files in current dir are
> > processed
> > before files in sub-dirs.
> > """
> > os.walk() defaults to topDown. So my change should be doing just what
> the
> > doc snippet says.
>
> Yes, that's the documentation I meant (the "docstring").
>
> As I read it, your change processes files sorted chronologically,
> regardless of their location within the tree. Am I wrong about that?
>
os.walk() returns a list of sub-dirs and files for one dir at a time
starting with root specified (including root). And the new code process all
files in each iteration, so its done processing files in a directory before
files deeper in the tree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20120323/4534a314/attachment-0003.html>
More information about the dev
mailing list