More coding style cleanup
Fixing more issues found with pylint. Some that were supposed to
have been fixed in the previous sweep (Ie0db839e) but were missed:
C0321: More than one statement on a single line
W0622: Redefining built-in 'name'
And some more:
W0631: Using possibly undefined loop variable 'name'
W0223: Method 'name' is abstract in class 'name' but is not overridden
W0231: __init__ method from base class 'name' is not called
Change-Id: Ie119183708609d6279e973057a385fde864230c3
diff --git a/error.py b/error.py
index 783ab7d..2148248 100644
--- a/error.py
+++ b/error.py
@@ -25,6 +25,7 @@
"""Unspecified error from the user's text editor.
"""
def __init__(self, reason):
+ super(EditorError, self).__init__()
self.reason = reason
def __str__(self):
@@ -34,6 +35,7 @@
"""Unspecified internal error from git.
"""
def __init__(self, command):
+ super(GitError, self).__init__()
self.command = command
def __str__(self):
@@ -43,6 +45,7 @@
"""A bundle upload to Gerrit did not succeed.
"""
def __init__(self, reason):
+ super(UploadError, self).__init__()
self.reason = reason
def __str__(self):
@@ -52,6 +55,7 @@
"""Cannot download a repository.
"""
def __init__(self, reason):
+ super(DownloadError, self).__init__()
self.reason = reason
def __str__(self):
@@ -61,6 +65,7 @@
"""A specified project does not exist in the work tree.
"""
def __init__(self, name=None):
+ super(NoSuchProjectError, self).__init__()
self.name = name
def __str__(self):
@@ -73,6 +78,7 @@
"""A specified project is not suitable for the specified groups
"""
def __init__(self, name=None):
+ super(InvalidProjectGroupsError, self).__init__()
self.name = name
def __str__(self):
@@ -86,6 +92,7 @@
use exec to re-execute repo with the new code and manifest.
"""
def __init__(self, extra_args=None):
+ super(RepoChangedException, self).__init__()
self.extra_args = extra_args or []
class HookError(Exception):
@@ -93,4 +100,3 @@
The common case is that the file wasn't present when we tried to run it.
"""
- pass