diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-10-29 13:12:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 14:28:20 +0100 |
commit | 43cf0cd7a97eecb99f34150b0935f8cf7386ac7b (patch) | |
tree | de568c8afbfec29d603ee9969c911ea2660d1f28 | |
parent | 0bceb501fdfc76ab8cc2473420d5e661123541df (diff) |
Early return if no submodules were found using DEPS files
While we're at it, also remove a stray currentDir variable
in readSubmodules.
Change-Id: Ia814906597f436513c4e57ed487ba478154eee4f
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r-- | tools/git_submodule.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/git_submodule.py b/tools/git_submodule.py index 7323167f6..084bd2b1f 100644 --- a/tools/git_submodule.py +++ b/tools/git_submodule.py @@ -203,7 +203,6 @@ class Submodule: def readSubmodules(self): - currentDir = os.getcwd() if not os.path.isfile('.gitmodules'): return [] gitmodules_file = open('.gitmodules') @@ -244,6 +243,10 @@ class Submodule: return # if we could not find any submodules in .gitmodules, try .DEPS.git submodules = self.readDeps() + + if not submodules: + return + print 'DEPS file provides the following submodules:' for submodule in submodules: print '{:<80}'.format(submodule.path) + '{:<120}'.format(submodule.url) + submodule.shasum |