On Thu, Jul 29, 2010 at 17:46, Michael Hanselmann <[email protected]> wrote:
> Am 29. Juli 2010 23:43 schrieb Iustin Pop <[email protected]>:
>> --- a/scripts/gnt-cluster
>> +++ b/scripts/gnt-cluster
>> +def MasterPing(opts, args):
>> […]
>> + try:
>> + cl = GetClient()
>> + result = cl.QueryClusterInfo()
>> + return 0
>> + except:
>
> Please make this at least “except Exception”. Then LGTM.
Interdiff (with pylint silencing):
diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index 930e70a..efd49ea 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -529,9 +529,9 @@ def MasterPing(opts, args):
"""
try:
cl = GetClient()
- result = cl.QueryClusterInfo()
+ cl.QueryClusterInfo()
return 0
- except:
+ except Exception: # pylint: disable-msg=W0703
return 1