Permalink
Browse files

qibuild.qiworktree: bug fixes for handling .qiblacklist

Did not work when .qiblacklist was at next to a qibuild.manifest.
  • Loading branch information...
1 parent 3f42070 commit 14762c65471aaef22f652898a006732013847627 @dmerejkowsky committed Oct 24, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/qibuild/qiworktree.py
@@ -244,6 +244,10 @@ def search_projects(directory=None, depth=3):
if os.path.exists(os.path.join(directory, "manifest.xml")):
rsrc.append(directory)
+ blacklist_file = os.path.join(directory, ".qiblacklist")
+ if os.path.exists(blacklist_file):
+ return(rgit, rsrc)
+
subdirs = list()
try:
dir_contents = [os.path.join(directory, s) for s in os.listdir(directory)]
@@ -253,9 +257,6 @@ def search_projects(directory=None, depth=3):
# If os.listdir fails (permission denied for instance),
# we will iter on a empty list, so no worry :)
for p in subdirs:
- blacklist_file = os.path.join(p, ".qiblacklist")
- if os.path.exists(blacklist_file):
- continue
sub_rgit, sub_rsrc = search_projects(p, depth - 1)
rgit.extend(sub_rgit)
rsrc.extend(sub_rsrc)

0 comments on commit 14762c6

Please sign in to comment.