From 6119b6df93a325822f0e265cb9916ffe9166c89f Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Sat, 6 Jun 2020 11:49:49 +0200 Subject: [PATCH] bugfix: catch multiple exceptions with tuple not list --- inventory_provider/juniper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory_provider/juniper.py b/inventory_provider/juniper.py index f30cb222..013b0afc 100644 --- a/inventory_provider/juniper.py +++ b/inventory_provider/juniper.py @@ -115,7 +115,7 @@ def _rpc(hostname, ssh): ssh_private_key_file=ssh['private-key']) try: dev.open() - except [EzErrors.ConnectError, EzErrors.RpcError] as e: + except (EzErrors.ConnectError, EzErrors.RpcError) as e: raise ConnectionError(str(e)) return dev.rpc -- GitLab