]> granicus.if.org Git - libevent/commitdiff
Fix indentation for `RpcGenError`
authorEnji Cooper <yaneurabeya@gmail.com>
Fri, 27 Mar 2020 00:28:09 +0000 (17:28 -0700)
committerEnji Cooper <yaneurabeya@gmail.com>
Fri, 27 Mar 2020 17:35:46 +0000 (10:35 -0700)
Indentation for the exception was double what it should have been. This
change normalizes the indentation to a consistent standard with the rest
of the file.

Fix minor flake8 issues while here corresponding to the minimum number
of needed blank lines around the class and its methods.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
event_rpcgen.py

index 9b66dfadf4643c03ce6db381a6bb242cb434da44..5b59c0db5b4ba955750fe43c10dac221c5ff929a 100755 (executable)
@@ -41,12 +41,16 @@ def declare(s):
 def TranslateList(mylist, mydict):
     return [x % mydict for x in mylist]
 
-# Exception class for parse errors
+
 class RpcGenError(Exception):
-        def __init__(self, why):
-                self.why = why
-        def __str__(self):
-                return str(self.why)
+    """An Exception class for parse errors."""
+
+    def __init__(self, why):
+        self.why = why
+
+    def __str__(self):
+        return str(self.why)
+
 
 # Holds everything that makes a struct
 class Struct: