summaryrefslogtreecommitdiffstats
path: root/error.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-11 16:44:48 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-22 12:30:14 +0900
commit5c6eeac8f0350fd6b14cf226ffcff655f1dd9582 (patch)
tree3225695b9d2a97342a49127717ea5e2bc5935a63 /error.py
parente98607248eec2b149d84efe944c12cbef419b82e (diff)
downloadgit-repo-5c6eeac8f0350fd6b14cf226ffcff655f1dd9582.tar.gz
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
Diffstat (limited to 'error.py')
-rw-r--r--error.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/error.py b/error.py
index 783ab7d2..21482486 100644
--- a/error.py
+++ b/error.py
@@ -25,6 +25,7 @@ class EditorError(Exception):
25 """Unspecified error from the user's text editor. 25 """Unspecified error from the user's text editor.
26 """ 26 """
27 def __init__(self, reason): 27 def __init__(self, reason):
28 super(EditorError, self).__init__()
28 self.reason = reason 29 self.reason = reason
29 30
30 def __str__(self): 31 def __str__(self):
@@ -34,6 +35,7 @@ class GitError(Exception):
34 """Unspecified internal error from git. 35 """Unspecified internal error from git.
35 """ 36 """
36 def __init__(self, command): 37 def __init__(self, command):
38 super(GitError, self).__init__()
37 self.command = command 39 self.command = command
38 40
39 def __str__(self): 41 def __str__(self):
@@ -43,6 +45,7 @@ class UploadError(Exception):
43 """A bundle upload to Gerrit did not succeed. 45 """A bundle upload to Gerrit did not succeed.
44 """ 46 """
45 def __init__(self, reason): 47 def __init__(self, reason):
48 super(UploadError, self).__init__()
46 self.reason = reason 49 self.reason = reason
47 50
48 def __str__(self): 51 def __str__(self):
@@ -52,6 +55,7 @@ class DownloadError(Exception):
52 """Cannot download a repository. 55 """Cannot download a repository.
53 """ 56 """
54 def __init__(self, reason): 57 def __init__(self, reason):
58 super(DownloadError, self).__init__()
55 self.reason = reason 59 self.reason = reason
56 60
57 def __str__(self): 61 def __str__(self):
@@ -61,6 +65,7 @@ class NoSuchProjectError(Exception):
61 """A specified project does not exist in the work tree. 65 """A specified project does not exist in the work tree.
62 """ 66 """
63 def __init__(self, name=None): 67 def __init__(self, name=None):
68 super(NoSuchProjectError, self).__init__()
64 self.name = name 69 self.name = name
65 70
66 def __str__(self): 71 def __str__(self):
@@ -73,6 +78,7 @@ class InvalidProjectGroupsError(Exception):
73 """A specified project is not suitable for the specified groups 78 """A specified project is not suitable for the specified groups
74 """ 79 """
75 def __init__(self, name=None): 80 def __init__(self, name=None):
81 super(InvalidProjectGroupsError, self).__init__()
76 self.name = name 82 self.name = name
77 83
78 def __str__(self): 84 def __str__(self):
@@ -86,6 +92,7 @@ class RepoChangedException(Exception):
86 use exec to re-execute repo with the new code and manifest. 92 use exec to re-execute repo with the new code and manifest.
87 """ 93 """
88 def __init__(self, extra_args=None): 94 def __init__(self, extra_args=None):
95 super(RepoChangedException, self).__init__()
89 self.extra_args = extra_args or [] 96 self.extra_args = extra_args or []
90 97
91class HookError(Exception): 98class HookError(Exception):
@@ -93,4 +100,3 @@ class HookError(Exception):
93 100
94 The common case is that the file wasn't present when we tried to run it. 101 The common case is that the file wasn't present when we tried to run it.
95 """ 102 """
96 pass