From: Zac Medico Date: Fri, 23 Jun 2006 07:29:20 +0000 (-0000) Subject: Sort filenames for predictable results. X-Git-Tag: v2.1.1~416 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5935cdf7ccaf96302378a0e3b47c7a0b85368220;p=portage.git Sort filenames for predictable results. svn path=/main/trunk/; revision=3621 --- diff --git a/pym/portage_util.py b/pym/portage_util.py index 798937b63..a8f396c51 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -182,7 +182,9 @@ def grabfile_package(myfilename, compatlevel=0, recursive=0): def grablines(myfilename,recursive=0): mylines=[] if recursive and os.path.isdir(myfilename): - for f in os.listdir(myfilename): + dirlist = os.listdir(myfilename) + dirlist.sort() + for f in dirlist: if not f.startswith("."): mylines.extend(grablines( os.path.join(myfilename, f), recursive))