Skip to content
This repository was archived by the owner on Sep 17, 2019. It is now read-only.

Commit 1a64f42

Browse files
authored
Merge pull request #97 from mirceaulinic/revert-92-master
Revert "Fix for bug when not installed."
2 parents 531eb5b + b400237 commit 1a64f42

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

napalm_base/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,14 @@
1919
import inspect
2020
import importlib
2121

22-
import pkg_resources
22+
from pkg_resources import get_distribution
2323

2424
# NAPALM base
2525

2626
from napalm_base.base import NetworkDriver
2727
from napalm_base.exceptions import ModuleImportError
2828

29-
try:
30-
__version__ = pkg_resources.get_distribution('napalm-base').version
31-
except pkg_resources.DistributionNotFound:
32-
__version__ = "Not installed"
29+
__version__ = get_distribution('napalm-base').version
3330

3431
__all__ = [
3532
'get_network_driver', # export the function

0 commit comments

Comments
 (0)