Commit fc3f75dd authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix decorator uses which crash newer pylint

Pylint version:

  pylint 0.25.1,
  astng 0.23.1, common 0.58.0

crashes when passing the fully-qualified decorator name with:

  File "/usr/lib/pymodules/python2.7/pylint/checkers/", line 161, in visit_function
    if not redefined_by_decorator(node):
  File "/usr/lib/pymodules/python2.7/pylint/checkers/", line 116, in redefined_by_decorator ==
AttributeError: 'Getattr' object has no attribute 'name'

I found out that simply using a shortened name will 'fix' this issue,
so let's do this to allow running newer pylint versions.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 2fefc557
......@@ -51,6 +51,7 @@ from ganeti import ssconf
from ganeti import ht
import ganeti.rapi.client # pylint: disable=W0611
from ganeti.rapi.client import UsesRapiClient
from ganeti.watcher import nodemaint
from ganeti.watcher import state
......@@ -569,7 +570,7 @@ def _CheckMaster(cl):
raise NotMasterError("This is not the master node")
def _GlobalWatcher(opts):
"""Main function for global watcher.
......@@ -48,6 +48,7 @@ from ganeti import rapi
from ganeti import constants
import ganeti.rapi.client # pylint: disable=W0611
from ganeti.rapi.client import UsesRapiClient
def _FormatHeader(line, end=72):
......@@ -544,7 +545,7 @@ def RunQa():
RunTestIf("cluster-destroy", qa_cluster.TestClusterDestroy)
def main():
"""Main program.
# Copyright (C) 2010 Google Inc.
# Copyright (C) 2010, 2011, 2012 Google Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -42,6 +42,7 @@ from ganeti import rapi
import ganeti.rapi.client # pylint: disable=W0611
import ganeti.rapi.client_utils
from ganeti.rapi.client import UsesRapiClient
......@@ -836,7 +837,7 @@ def CheckOptions(parser, options, args):
return (src_cluster_name, dest_cluster_name, instance_names)
def main():
"""Main routine.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment