Skip to content

Commit

Permalink
more updates to napalm base imports
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks committed Jan 21, 2018
1 parent 2beb76f commit 598a413
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@
import time

# local modules
from napalm_base.utils.string_parsers import convert_uptime_string_seconds
from napalm_base.exceptions import ConnectionException, ReplaceConfigException,\
MergeConfigException

try:
from napalm.base.utils.string_parsers import convert_uptime_string_seconds
from napalm.base.exceptions import ConnectionException,\
ReplaceConfigException,\
MergeConfigException
from napalm.base import NetworkDriver
from napalm.base.utils import py23_compat
except ImportError:
from napalm_base.utils.string_parsers import convert_uptime_string_seconds
from napalm_base.exceptions import ConnectionException,\
ReplaceConfigException,\
MergeConfigException
from napalm_base.base import NetworkDriver
from napalm_base.utils import py23_compat

from napalm_base.utils import py23_compat

from netmiko import ConnectHandler
from netmiko import __version__ as netmiko_version
Expand Down
2 changes: 1 addition & 1 deletion test/unit/TestDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import unittest

from napalm_panos import panos
from napalm_base.test.base import TestConfigNetworkDriver
from napalm.base.test.base import TestConfigNetworkDriver


class TestConfigDriver(unittest.TestCase, TestConfigNetworkDriver):
Expand Down
4 changes: 2 additions & 2 deletions test/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from builtins import super

import pytest
from napalm_base.test import conftest as parent_conftest
from napalm_base.test.double import BaseTestDouble
from napalm.base.test import conftest as parent_conftest
from napalm.base.test.double import BaseTestDouble

from napalm_panos import PANOSDriver as OriginalDriver

Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_getters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for getters."""

from napalm_base.test.getters import BaseTestGetters
from napalm.base.test.getters import BaseTestGetters


import pytest
Expand Down

0 comments on commit 598a413

Please sign in to comment.