diff options
| author | Conley Owens <cco3@android.com> | 2012-10-09 14:29:46 -0700 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-09 14:29:46 -0700 |
| commit | 3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63 (patch) | |
| tree | 68ae5094d6530453887fb35a73fd5fa55f55a034 /command.py | |
| parent | 25f17682ca4ecd8acc887462d4bebc7c429cf110 (diff) | |
| parent | 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (diff) | |
| download | git-repo-3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63.tar.gz | |
Merge "Coding style cleanup"
Diffstat (limited to 'command.py')
| -rw-r--r-- | command.py | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -63,7 +63,7 @@ class Command(object): | |||
| 63 | def GetProjects(self, args, missing_ok=False): | 63 | def GetProjects(self, args, missing_ok=False): |
| 64 | """A list of projects that match the arguments. | 64 | """A list of projects that match the arguments. |
| 65 | """ | 65 | """ |
| 66 | all = self.manifest.projects | 66 | all_projects = self.manifest.projects |
| 67 | result = [] | 67 | result = [] |
| 68 | 68 | ||
| 69 | mp = self.manifest.manifestProject | 69 | mp = self.manifest.manifestProject |
| @@ -74,7 +74,7 @@ class Command(object): | |||
| 74 | groups = [x for x in re.split('[,\s]+', groups) if x] | 74 | groups = [x for x in re.split('[,\s]+', groups) if x] |
| 75 | 75 | ||
| 76 | if not args: | 76 | if not args: |
| 77 | for project in all.values(): | 77 | for project in all_projects.values(): |
| 78 | if ((missing_ok or project.Exists) and | 78 | if ((missing_ok or project.Exists) and |
| 79 | project.MatchesGroups(groups)): | 79 | project.MatchesGroups(groups)): |
| 80 | result.append(project) | 80 | result.append(project) |
| @@ -82,14 +82,14 @@ class Command(object): | |||
| 82 | by_path = None | 82 | by_path = None |
| 83 | 83 | ||
| 84 | for arg in args: | 84 | for arg in args: |
| 85 | project = all.get(arg) | 85 | project = all_projects.get(arg) |
| 86 | 86 | ||
| 87 | if not project: | 87 | if not project: |
| 88 | path = os.path.abspath(arg).replace('\\', '/') | 88 | path = os.path.abspath(arg).replace('\\', '/') |
| 89 | 89 | ||
| 90 | if not by_path: | 90 | if not by_path: |
| 91 | by_path = dict() | 91 | by_path = dict() |
| 92 | for p in all.values(): | 92 | for p in all_projects.values(): |
| 93 | by_path[p.worktree] = p | 93 | by_path[p.worktree] = p |
| 94 | 94 | ||
| 95 | if os.path.exists(path): | 95 | if os.path.exists(path): |
