Skip to content

Commit

Permalink
Import constituent packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Oct 30, 2019
1 parent f3a1edc commit 6de6dd1
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions napalm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6de6dd1

Please sign in to comment.