From d60060c96a878dba898a319da54d60cc62ce548f Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 21 Oct 2019 11:53:20 +0100 Subject: [PATCH] Fool PyLint. It's a "decorator"! --- salt/utils/process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/utils/process.py b/salt/utils/process.py index a9d64f96ce..bc4e8c510b 100644 --- a/salt/utils/process.py +++ b/salt/utils/process.py @@ -720,7 +720,10 @@ class Process(multiprocessing.Process, NewStyleClassMixIn): # we must wrap this class run method to allow for these extra steps # to be executed pre and post calling the actual run method, # having subclasses call super would just not work. - self.run = self.__decorate_run(self.run) + # + # We use setattr here to fool pylint not to complain that we're + # overriding run from the subclass here + setattr(self, 'run', self.__decorate_run(self.run)) # __setstate__ and __getstate__ are only used on Windows. def __setstate__(self, state):