Ignore hidden files and directories in grablines recursion for bug #137607. This...
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 19:07:36 +0000 (19:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 19:07:36 +0000 (19:07 -0000)
svn path=/main/branches/2.1/; revision=4073

pym/portage_util.py

index 889a82330706902a4a71567a49939a1c0f2fb08b..c3b8e5eaf3c3918d1bbbd75cbd3363a977d1a6cf 100644 (file)
@@ -181,10 +181,12 @@ def grabfile_package(myfilename, compatlevel=0, recursive=0):
 def grablines(myfilename,recursive=0):
        mylines=[]
        if recursive and os.path.isdir(myfilename):
-               myfiles = [myfilename+os.path.sep+x for x in os.listdir(myfilename)]
-               myfiles.sort()
-               for f in myfiles:
-                       mylines.extend(grablines(f, recursive))
+               dirlist = os.listdir(myfilename)
+               dirlist.sort()
+               for f in dirlist:
+                       if not f.startswith("."):
+                               mylines.extend(grablines(
+                                       os.path.join(myfilename, f), recursive))
        else:
                try:
                        myfile = open(myfilename, "r")