Skip to content

Commit 9e7d359

Browse files
committed
Codechange: Fix Ply version check used by nmlc --version
- Change imports to only import __version__ - Change Pillow import to be similar to new fixed Ply import - Fix Ply import not using __version__ from bundled Ply
1 parent 295f71e commit 9e7d359

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nml/version_info.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ def get_lib_versions():
2121
versions = {}
2222
# PIL
2323
try:
24-
import PIL
24+
from PIL import __version__ as pil_version
2525

26-
versions["PIL"] = PIL.__version__
26+
versions["PIL"] = pil_version
2727
except ImportError:
2828
versions["PIL"] = "Not found!"
2929

3030
# PLY
3131
try:
32-
from ply import lex
32+
from .ply import __version__ as ply_version
3333

34-
versions["PLY"] = lex.__version__
34+
versions["PLY"] = ply_version
3535
except ImportError:
3636
versions["PLY"] = "Not found!"
3737

0 commit comments

Comments
 (0)