summaryrefslogtreecommitdiff
path: root/morphlib/plugins/branch_and_merge_new_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/plugins/branch_and_merge_new_plugin.py')
-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 0650ce85..03467fd4 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.
@@ -560,10 +559,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):