Skip to content

Commit

Permalink
remove handling of import errors
Browse files Browse the repository at this point in the history
should be done in the code using the lib, not here
  • Loading branch information
NavidSassan committed Jul 19, 2022
1 parent 9bd217d commit c6fb055
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions smb3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c6fb055

Please sign in to comment.