summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-25 12:23:11 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-30 10:28:20 +0900
commit1d947b30342163b723c96db563967323535fef45 (patch)
treeb6b02d02df01792b356b9e50ceeaadcaf3a2e8c5 /subcmds
parent2d113f35460051823ea54d61c5c939565518f969 (diff)
downloadgit-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 'subcmds')
-rw-r--r--subcmds/grep.py2
-rw-r--r--subcmds/init.py2
-rw-r--r--subcmds/sync.py2
-rw-r--r--subcmds/upload.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/grep.py b/subcmds/grep.py
index 0dc8f9f6..b067629a 100644
--- a/subcmds/grep.py
+++ b/subcmds/grep.py
@@ -51,7 +51,7 @@ Examples
51 51
52Look for a line that has '#define' and either 'MAX_PATH or 'PATH_MAX': 52Look for a line that has '#define' and either 'MAX_PATH or 'PATH_MAX':
53 53
54 repo grep -e '#define' --and -\( -e MAX_PATH -e PATH_MAX \) 54 repo grep -e '#define' --and -\\( -e MAX_PATH -e PATH_MAX \\)
55 55
56Look for a line that has 'NODE' or 'Unexpected' in files that 56Look for a line that has 'NODE' or 'Unexpected' in files that
57contain a line that matches both expressions: 57contain a line that matches both expressions:
diff --git a/subcmds/init.py b/subcmds/init.py
index e56b9223..48df9e89 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -147,7 +147,7 @@ to update the working directory files.
147 r.ResetFetch() 147 r.ResetFetch()
148 r.Save() 148 r.Save()
149 149
150 groups = re.split('[,\s]+', opt.groups) 150 groups = re.split(r'[,\s]+', opt.groups)
151 all_platforms = ['linux', 'darwin'] 151 all_platforms = ['linux', 'darwin']
152 platformize = lambda x: 'platform-' + x 152 platformize = lambda x: 'platform-' + x
153 if opt.platform == 'auto': 153 if opt.platform == 'auto':
diff --git a/subcmds/sync.py b/subcmds/sync.py
index d4637d0c..8e9477a3 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -696,7 +696,7 @@ class _FetchTimes(object):
696 try: 696 try:
697 try: 697 try:
698 self._times = pickle.load(f) 698 self._times = pickle.load(f)
699 except: 699 except IOError:
700 try: 700 try:
701 os.remove(self._path) 701 os.remove(self._path)
702 except OSError: 702 except OSError:
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 84a5e440..39721ac2 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -297,7 +297,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
297 try: 297 try:
298 # refs/changes/XYZ/N --> XYZ 298 # refs/changes/XYZ/N --> XYZ
299 return refs.get(last_pub).split('/')[-2] 299 return refs.get(last_pub).split('/')[-2]
300 except: 300 except (AttributeError, IndexError):
301 return "" 301 return ""
302 302
303 def _UploadAndReport(self, opt, todo, original_people): 303 def _UploadAndReport(self, opt, todo, original_people):