From: Enji Cooper Date: Fri, 27 Mar 2020 00:28:09 +0000 (-0700) Subject: Fix indentation for `RpcGenError` X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5408b9636f4afded6db44299720a4b3f6e9883d5;p=libevent Fix indentation for `RpcGenError` 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 --- diff --git a/event_rpcgen.py b/event_rpcgen.py index 9b66dfad..5b59c0db 100755 --- a/event_rpcgen.py +++ b/event_rpcgen.py @@ -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: