utils: disable one pylint warning
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 16 Feb 2015 15:45:10 +0000 (17:45 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 16 Feb 2015 15:45:10 +0000 (17:45 +0200)
In this case we really want to catch all exceptions - we don't want to
crash the service if an unhandled exception occurs in the child
function, e.g. gbp.

Change-Id: I9eeee980188adca23c5c641e7a11caf8bdffbcc6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
obs_service_gbp_utils/__init__.py

index c0cea1e62339bc1264af7f2642a91da7302b4ade..33fd7654a89965672edda12d1ad6111690f7f37c 100644 (file)
@@ -77,9 +77,11 @@ def _demoted_child_call(uid, gid, ret_data_q, func):
     try:
         # Func must be a callable without arguments
         ret = func()
+    # pylint: disable=broad-except
     except Exception as err:
         ret_data_q.put(GbpChildBTError())
         sys.exit(_RET_FORK_ERR)
+    # pylint: enable=broad-except
     else:
         ret_data_q.put(ret)
     sys.exit(_RET_FORK_OK)