From fb33a71720e3ba8aac2a0bd915cb66c3c4576acb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Oct 2020 00:34:03 -0400 Subject: [PATCH] look for liblammps.dll in windows binary dir only if that directory exists --- python/lammps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lammps.py b/python/lammps.py index e3c8f7f61c..59f2dce012 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -199,8 +199,8 @@ class lammps(object): elif any([f.startswith('liblammps') and f.endswith('.dll') for f in os.listdir(modpath)]): lib_ext = ".dll" - elif any([f.startswith('liblammps') and f.endswith('.dll') - for f in os.listdir(winpath)]): + elif os.path.exists(winpath) and any([f.startswith('liblammps') and f.endswith('.dll') + for f in os.listdir(winpath)]): lib_ext = ".dll" modpath = winpath else: