From 1d947b30342163b723c96db563967323535fef45 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 25 Oct 2012 12:23:11 +0900 Subject: Even more coding style cleanup Fixing some more pylint warnings: W1401: Anomalous backslash in string W0623: Redefining name 'name' from outer scope W0702: No exception type(s) specified E0102: name: function already defined line n Change-Id: I5afcdb4771ce210390a79981937806e30900a93c --- project.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 2f471692..6e8bb032 100644 --- a/project.py +++ b/project.py @@ -1012,6 +1012,10 @@ class Project(object): self.CleanPublishedCache(all_refs) revid = self.GetRevisionId(all_refs) + def _doff(): + self._FastForward(revid) + self._CopyFiles() + self._InitWorkTree() head = self.work_git.GetHead() if head.startswith(R_HEADS): @@ -1090,9 +1094,6 @@ class Project(object): # All published commits are merged, and thus we are a # strict subset. We can fast-forward safely. # - def _doff(): - self._FastForward(revid) - self._CopyFiles() syncbuf.later1(self, _doff) return @@ -1155,9 +1156,6 @@ class Project(object): syncbuf.fail(self, e) return else: - def _doff(): - self._FastForward(revid) - self._CopyFiles() syncbuf.later1(self, _doff) def AddCopyFile(self, src, dest, absdest): @@ -1836,7 +1834,8 @@ class Project(object): if p.Wait() == 0: out = p.stdout if out: - return out[:-1].split("\0") + return out[:-1].split('\0') # pylint: disable=W1401 + # Backslash is not anomalous return [] def DiffZ(self, name, *args): @@ -1852,7 +1851,7 @@ class Project(object): out = p.process.stdout.read() r = {} if out: - out = iter(out[:-1].split('\0')) + out = iter(out[:-1].split('\0')) # pylint: disable=W1401 while out: try: info = out.next() -- cgit v1.2.3-54-g00ecf