[elbe-devel] [PATCH 23/25] pylint: updated: init self.app in __init__()
Torben Hohn
torben.hohn at linutronix.de
Wed Aug 22 10:42:24 CEST 2018
pylint complains:
--------------------------------------------------------------------------------------------------------------------------------
elbepack/updated.py:129: [E1101(no-member), UpdateService.apply_snapshot] Instance of 'UpdateService' has no 'app' member
elbepack/updated.py:132: [E1101(no-member), UpdateService.apply_snapshot] Instance of 'UpdateService' has no 'app' member
elbepack/updated.py:135: [E1101(no-member), UpdateService.apply_snapshot] Instance of 'UpdateService' has no 'app' member
elbepack/updated.py:138: [E1101(no-member), UpdateService.apply_snapshot] Instance of 'UpdateService' has no 'app' member
elbepack/updated.py:143: [E1101(no-member), UpdateService.register_monitor] Instance of 'UpdateService' has no 'app' member
elbepack/updated.py:144: [E1101(no-member), UpdateService.register_monitor] Instance of 'UpdateService' has no 'app' member
--------------------------------------------------------------------------------------------------------------------------------
app is setup via spyne. However, add an __init__() method, and
set self.app to None, so that pylint believes app exists.
This patch needs to be tested, and its even unclear, whether
__init__() is actually executed.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/updated.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/elbepack/updated.py b/elbepack/updated.py
index 5f9ce253..2ef8408e 100644
--- a/elbepack/updated.py
+++ b/elbepack/updated.py
@@ -105,6 +105,11 @@ class UpdateApplication (Application):
class UpdateService (ServiceBase):
+ def __init__(self):
+ # init self.app, so that pylint knows,
+ # that it exists
+ self.app = None
+
@rpc(_returns=String)
def list_snapshots(self):
# use comma seperated string because array of string triggers a bug in
--
2.11.0
More information about the elbe-devel
mailing list