From c6fb0556097ad77cd4ff7d0ffe588dbd55079adc Mon Sep 17 00:00:00 2001 From: Navid Sassan Date: Tue, 19 Jul 2022 12:14:56 +0200 Subject: [PATCH] remove handling of import errors should be done in the code using the lib, not here --- smb3.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/smb3.py b/smb3.py index aee6b60..f5835b3 100644 --- a/smb3.py +++ b/smb3.py @@ -12,22 +12,13 @@ """ __author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' -__version__ = '2022062001' +__version__ = '2022071901' import sys from .globals3 import STATE_UNKNOWN -try: - import smbclient -except ImportError as e: - print('Python module "smbclient" is not installed.') - sys.exit(STATE_UNKNOWN) -try: - import smbprotocol.exceptions -except ImportError as e: - print('Python module "smbprotocol" is not installed.') - sys.exit(STATE_UNKNOWN) - +import smbclient +import smbprotocol.exceptions def open_file(path, username, password, timeout, encrypt=True): try: