From 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 24 Sep 2012 12:15:13 +0900 Subject: Coding style cleanup Fix the following issues reported by pylint: C0321: More than one statement on a single line W0622: Redefining built-in 'name' W0612: Unused variable 'name' W0613: Unused argument 'name' W0102: Dangerous default value 'value' as argument W0105: String statement has no effect Also fixed a few cases of inconsistent indentation. Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744 --- subcmds/sync.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'subcmds/sync.py') diff --git a/subcmds/sync.py b/subcmds/sync.py index b84d169f..1b716351 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -316,8 +316,7 @@ later is required to fix a server side protocol bug. if not path: continue if path not in new_project_paths: - """If the path has already been deleted, we don't need to do it - """ + # If the path has already been deleted, we don't need to do it if os.path.exists(self.manifest.topdir + '/' + path): project = Project( manifest = self.manifest, @@ -495,16 +494,16 @@ uncommitted changes are present' % project.relpath self.manifest._Unload() if opt.jobs is None: self.jobs = self.manifest.default.sync_j - all = self.GetProjects(args, missing_ok=True) + all_projects = self.GetProjects(args, missing_ok=True) if not opt.local_only: to_fetch = [] now = time.time() if (24 * 60 * 60) <= (now - rp.LastFetch): to_fetch.append(rp) - to_fetch.extend(all) + to_fetch.extend(all_projects) - fetched = self._Fetch(to_fetch, opt) + self._Fetch(to_fetch, opt) _PostRepoFetch(rp, opt.no_repo_verify) if opt.network_only: # bail out now; the rest touches the working tree @@ -519,8 +518,8 @@ uncommitted changes are present' % project.relpath syncbuf = SyncBuffer(mp.config, detach_head = opt.detach_head) - pm = Progress('Syncing work tree', len(all)) - for project in all: + pm = Progress('Syncing work tree', len(all_projects)) + for project in all_projects: pm.update() if project.worktree: project.Sync_LocalHalf(syncbuf) -- cgit v1.2.3-54-g00ecf