further fixes of py3 issues

complaints by pylint are mainly related to
- remove object from base list in class definitions
- unnecessary else/elif after return/raise

Change-Id: I13d15449149cc8bba0562338d0c9c42e97163bdf
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21325
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2019-09-26 13:17:49 +02:00
parent 70a9c42a7a
commit c1164568ae
33 changed files with 83 additions and 89 deletions

View File

@ -50,7 +50,7 @@ from secop.protocol.messages import COMMANDREPLY, DESCRIPTIONREPLY, \
HEARTBEATREPLY, IDENTREPLY, IDENTREQUEST, READREPLY, WRITEREPLY
class Dispatcher(object):
class Dispatcher:
def __init__(self, name, logger, options, srv):
# to avoid errors, we want to eat all options here
@ -145,7 +145,7 @@ class Dispatcher(object):
def get_module(self, modulename):
if modulename in self._modules:
return self._modules[modulename]
elif modulename in list(self._modules.values()):
if modulename in list(self._modules.values()):
return modulename
raise NoSuchModuleError('Module does not exist on this SEC-Node!')
@ -296,8 +296,7 @@ class Dispatcher(object):
if handler:
return handler(conn, specifier, data)
else:
raise InternalError('unhandled message!')
raise InternalError('unhandled message!')
# now the (defined) handlers for the different requests
def handle_help(self, conn, specifier, data):