diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-25 12:23:11 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-30 10:28:20 +0900 |
commit | 1d947b30342163b723c96db563967323535fef45 (patch) | |
tree | b6b02d02df01792b356b9e50ceeaadcaf3a2e8c5 /project.py | |
parent | 2d113f35460051823ea54d61c5c939565518f969 (diff) | |
download | git-repo-1d947b30342163b723c96db563967323535fef45.tar.gz |
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
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1012,6 +1012,10 @@ class Project(object): | |||
1012 | self.CleanPublishedCache(all_refs) | 1012 | self.CleanPublishedCache(all_refs) |
1013 | revid = self.GetRevisionId(all_refs) | 1013 | revid = self.GetRevisionId(all_refs) |
1014 | 1014 | ||
1015 | def _doff(): | ||
1016 | self._FastForward(revid) | ||
1017 | self._CopyFiles() | ||
1018 | |||
1015 | self._InitWorkTree() | 1019 | self._InitWorkTree() |
1016 | head = self.work_git.GetHead() | 1020 | head = self.work_git.GetHead() |
1017 | if head.startswith(R_HEADS): | 1021 | if head.startswith(R_HEADS): |
@@ -1090,9 +1094,6 @@ class Project(object): | |||
1090 | # All published commits are merged, and thus we are a | 1094 | # All published commits are merged, and thus we are a |
1091 | # strict subset. We can fast-forward safely. | 1095 | # strict subset. We can fast-forward safely. |
1092 | # | 1096 | # |
1093 | def _doff(): | ||
1094 | self._FastForward(revid) | ||
1095 | self._CopyFiles() | ||
1096 | syncbuf.later1(self, _doff) | 1097 | syncbuf.later1(self, _doff) |
1097 | return | 1098 | return |
1098 | 1099 | ||
@@ -1155,9 +1156,6 @@ class Project(object): | |||
1155 | syncbuf.fail(self, e) | 1156 | syncbuf.fail(self, e) |
1156 | return | 1157 | return |
1157 | else: | 1158 | else: |
1158 | def _doff(): | ||
1159 | self._FastForward(revid) | ||
1160 | self._CopyFiles() | ||
1161 | syncbuf.later1(self, _doff) | 1159 | syncbuf.later1(self, _doff) |
1162 | 1160 | ||
1163 | def AddCopyFile(self, src, dest, absdest): | 1161 | def AddCopyFile(self, src, dest, absdest): |
@@ -1836,7 +1834,8 @@ class Project(object): | |||
1836 | if p.Wait() == 0: | 1834 | if p.Wait() == 0: |
1837 | out = p.stdout | 1835 | out = p.stdout |
1838 | if out: | 1836 | if out: |
1839 | return out[:-1].split("\0") | 1837 | return out[:-1].split('\0') # pylint: disable=W1401 |
1838 | # Backslash is not anomalous | ||
1840 | return [] | 1839 | return [] |
1841 | 1840 | ||
1842 | def DiffZ(self, name, *args): | 1841 | def DiffZ(self, name, *args): |
@@ -1852,7 +1851,7 @@ class Project(object): | |||
1852 | out = p.process.stdout.read() | 1851 | out = p.process.stdout.read() |
1853 | r = {} | 1852 | r = {} |
1854 | if out: | 1853 | if out: |
1855 | out = iter(out[:-1].split('\0')) | 1854 | out = iter(out[:-1].split('\0')) # pylint: disable=W1401 |
1856 | while out: | 1855 | while out: |
1857 | try: | 1856 | try: |
1858 | info = out.next() | 1857 | info = out.next() |