From 24da55ddd22a4a072c354301fb6b7de4269ee5c8 Mon Sep 17 00:00:00 2001 From: MatthieuDartiailh Date: Fri, 7 Aug 2020 16:45:51 -0400 Subject: [PATCH] gpib: do not import GpibError from Gpib since it lives in gpib module --- pyvisa_py/gpib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvisa_py/gpib.py b/pyvisa_py/gpib.py index b6d85f37..a2fc6ff4 100644 --- a/pyvisa_py/gpib.py +++ b/pyvisa_py/gpib.py @@ -37,7 +37,7 @@ GPIB_CTYPES = False try: import gpib # typing: ignore - from Gpib import Gpib, GpibError # typing: ignore + from Gpib import Gpib # typing: ignore except ImportError as e: Session.register_unavailable( constants.InterfaceType.gpib, @@ -463,7 +463,7 @@ def gpib_control_ren(self, mode: constants.RENLineOperation) -> StatusCode: ifc.listener( self.parsed.primary_address, self.parsed.secondary_address ) - except GpibError as e: + except gpib.GpibError as e: return convert_gpib_error(e, self.interface.ibsta(), "perform control REN") return constants.StatusCode.success