diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1421,7 +1421,7 @@ class Project(object): | |||
1421 | # because the working tree might not exist yet, and it cannot be used | 1421 | # because the working tree might not exist yet, and it cannot be used |
1422 | # without a working tree in its current implementation. | 1422 | # without a working tree in its current implementation. |
1423 | 1423 | ||
1424 | def get_submodules(gitdir, rev, path): | 1424 | def get_submodules(gitdir, rev): |
1425 | # Parse .gitmodules for submodule sub_paths and sub_urls | 1425 | # Parse .gitmodules for submodule sub_paths and sub_urls |
1426 | sub_paths, sub_urls = parse_gitmodules(gitdir, rev) | 1426 | sub_paths, sub_urls = parse_gitmodules(gitdir, rev) |
1427 | if not sub_paths: | 1427 | if not sub_paths: |
@@ -1436,7 +1436,6 @@ class Project(object): | |||
1436 | except KeyError: | 1436 | except KeyError: |
1437 | # Ignore non-exist submodules | 1437 | # Ignore non-exist submodules |
1438 | continue | 1438 | continue |
1439 | sub_gitdir = self.manifest.GetSubprojectPaths(self, sub_path)[2] | ||
1440 | submodules.append((sub_rev, sub_path, sub_url)) | 1439 | submodules.append((sub_rev, sub_path, sub_url)) |
1441 | return submodules | 1440 | return submodules |
1442 | 1441 | ||
@@ -1447,7 +1446,7 @@ class Project(object): | |||
1447 | try: | 1446 | try: |
1448 | p = GitCommand(None, cmd, capture_stdout = True, capture_stderr = True, | 1447 | p = GitCommand(None, cmd, capture_stdout = True, capture_stderr = True, |
1449 | bare = True, gitdir = gitdir) | 1448 | bare = True, gitdir = gitdir) |
1450 | except GitError as e: | 1449 | except GitError: |
1451 | return [], [] | 1450 | return [], [] |
1452 | if p.Wait() != 0: | 1451 | if p.Wait() != 0: |
1453 | return [], [] | 1452 | return [], [] |
@@ -1463,7 +1462,7 @@ class Project(object): | |||
1463 | if p.Wait() != 0: | 1462 | if p.Wait() != 0: |
1464 | return [], [] | 1463 | return [], [] |
1465 | gitmodules_lines = p.stdout.split('\n') | 1464 | gitmodules_lines = p.stdout.split('\n') |
1466 | except GitError as e: | 1465 | except GitError: |
1467 | return [], [] | 1466 | return [], [] |
1468 | finally: | 1467 | finally: |
1469 | os.remove(temp_gitmodules_path) | 1468 | os.remove(temp_gitmodules_path) |
@@ -1510,7 +1509,7 @@ class Project(object): | |||
1510 | rev = self.GetRevisionId() | 1509 | rev = self.GetRevisionId() |
1511 | except GitError: | 1510 | except GitError: |
1512 | return [] | 1511 | return [] |
1513 | return get_submodules(self.gitdir, rev, '') | 1512 | return get_submodules(self.gitdir, rev) |
1514 | 1513 | ||
1515 | def GetDerivedSubprojects(self): | 1514 | def GetDerivedSubprojects(self): |
1516 | result = [] | 1515 | result = [] |