summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-08-30 15:19:11 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-08-30 15:20:41 +0100
commit9c556bec4760b1eed04740d8d2bc6b76f0dd04c7 (patch)
tree23cd947d6da746acbe94378421da5dcac321d302
parent77d55b996d9b035de1ad1681825b46bd85139ade (diff)
downloadmorph-9c556bec4760b1eed04740d8d2bc6b76f0dd04c7.tar.gz
Correctly ignore hidden dirs when searching for system branch
Fixes test failures after merging previous branch
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index dcadba7b..41bbadde 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -89,7 +89,10 @@ class BranchAndMergePlugin(cliapp.Plugin):
# Do not recurse deeper if we have more than one
# non-hidden directory.
- if len([x for x in subdirs if not x.startswith('.')]) > 1:
+ for d in subdirs:
+ if d.startswith('.'):
+ subdirs.remove(d)
+ if len(subdirs) > 1:
break
raise cliapp.AppException("Can't find the system branch directory")