[elbe-devel] [PATCH 10/11] rpcaptcache: ValueError is not derived from BaseException

Manuel Traut manut at linutronix.de
Mon Jan 29 13:21:09 CET 2018


autopep8 cleanup in commit 068507337aaa0fb32ee3ca7d1e410884d0b253ff
changed 'except:' into 'except BaseException'. However the ValueError that might
occur here is not derived from BaseException.

Change the code to except a ValueError.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/rpcaptcache.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
index eb485cee..d843639d 100644
--- a/elbepack/rpcaptcache.py
+++ b/elbepack/rpcaptcache.py
@@ -116,11 +116,11 @@ class RPCAPTCache(InChRootObject):
         # we don't want to ignore libstdc++
         try:
             ignore_pkgs.remove('libstdc++5')
-        except BaseException:
+        except ValueError:
             pass
         try:
             ignore_pkgs.remove('libstdc++6')
-        except BaseException:
+        except ValueError:
             pass
         # list all debian src packages of all installed packages that don't
         # come from debootstrap
-- 
2.15.1




More information about the elbe-devel mailing list