diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-17 15:22:41 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-17 15:22:41 +0000 |
commit | 5893a490e953077ecc5b39a2eec0cb3e5e150ede (patch) | |
tree | 8d7b1fddf2a9c7c5fc4f9111b2963e6eac7adca7 /morphlib/git.py | |
parent | 5ddb496be3268cf1236d3d51001386763fb1f87a (diff) | |
download | morph-5893a490e953077ecc5b39a2eec0cb3e5e150ede.tar.gz |
Handle empty/short lines when validating submodules
Diffstat (limited to 'morphlib/git.py')
-rw-r--r-- | morphlib/git.py | 2 |
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 |