summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/plugins/branch_and_merge_new_plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py
index 5ff9e34d..32b769cd 100644
--- a/morphlib/plugins/branch_and_merge_new_plugin.py
+++ b/morphlib/plugins/branch_and_merge_new_plugin.py
@@ -197,7 +197,6 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
if not self._checkout_has_systems(gd):
raise BranchRootHasNoSystemsError(root_url, base_ref)
-
def branch(self, args):
'''Create a new system branch.
@@ -529,10 +528,11 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
@staticmethod
def _checkout_has_systems(gd):
loader = morphlib.morphloader.MorphologyLoader()
- for filename in glob.iglob(os.path.join(gd.dirname, '*.morph')):
- m = loader.load_from_file(filename)
- if m['kind'] == 'system':
- return True
+ for filename in gd.list_files():
+ if filename.endswith('.morph'):
+ m = loader.load_from_file(gd.join_path(filename))
+ if m['kind'] == 'system':
+ return True
return False
def foreach(self, args):