From 6de6dd1d4286b5f6b836f381a9b20df1882555d0 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 30 Oct 2019 16:26:18 -0700 Subject: [PATCH] Import constituent packages --- napalm/__init__.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/napalm/__init__.py b/napalm/__init__.py index 22d46d32d..3ad6e7adc 100644 --- a/napalm/__init__.py +++ b/napalm/__init__.py @@ -3,14 +3,22 @@ from napalm.base import get_network_driver from napalm._SUPPORTED_DRIVERS import SUPPORTED_DRIVERS +# Load constituent packages to fix threading deadlock on get_network_driver() +import napalm.eos +import napalm.ios +import napalm.iosxr +import napalm.junos +import napalm.nxos +import napalm.nxos_ssh +import napalm.pyIOSXR +import napalm.nxapi_plumbing # noqa + # Verify Python Version that is running try: - if not (sys.version_info.major == 2 and sys.version_info.minor == 7) and not ( - sys.version_info.major == 3 - ): - raise RuntimeError("NAPALM requires Python 2.7 or Python3") + if not (sys.version_info.major == 3 and sys.version_info.minor >= 6): + raise RuntimeError("NAPALM requires Python 3.6 or greater") except AttributeError: - raise RuntimeError("NAPALM requires Python 2.7 or Python3") + raise RuntimeError("NAPALM requires Python 3.6 or greater") try: __version__ = pkg_resources.get_distribution("napalm").version