summaryrefslogtreecommitdiff
path: root/morphlib/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/git.py')
-rw-r--r--morphlib/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/git.py b/morphlib/git.py
index 5563d625..cca51eed 100644
--- a/morphlib/git.py
+++ b/morphlib/git.py
@@ -183,7 +183,7 @@ class Submodules(object):
# read the commit hash from the output
fields = commit.split()
- if fields[1] == 'commit':
+ if len(fields) >= 2 and fields[1] == 'commit':
submodule.commit = commit.split()[2]
# fail if the commit hash is invalid