silence codeql warnings
This commit is contained in:
@ -29,14 +29,16 @@ def get_version_number():
|
|||||||
try:
|
try:
|
||||||
vstring = version('lammps')
|
vstring = version('lammps')
|
||||||
except:
|
except:
|
||||||
vstring = None
|
# nothing to do, ignore
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
from pkg_resources import get_distribution
|
from pkg_resources import get_distribution
|
||||||
try:
|
try:
|
||||||
vstring = get_distribution('lammps').version
|
vstring = get_distribution('lammps').version
|
||||||
except:
|
except:
|
||||||
vstring = None
|
# nothing to do, ignore
|
||||||
|
pass
|
||||||
|
|
||||||
if not vstring:
|
if not vstring:
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@ -778,6 +778,8 @@ class lammps(object):
|
|||||||
elif dtype == LAMMPS_STRING:
|
elif dtype == LAMMPS_STRING:
|
||||||
self.lib.lammps_extract_global.restype = c_char_p
|
self.lib.lammps_extract_global.restype = c_char_p
|
||||||
target_type = str
|
target_type = str
|
||||||
|
else:
|
||||||
|
target_type = None
|
||||||
|
|
||||||
ptr = self.lib.lammps_extract_global(self.lmp, name)
|
ptr = self.lib.lammps_extract_global(self.lmp, name)
|
||||||
if ptr:
|
if ptr:
|
||||||
|
|||||||
Reference in New Issue
Block a user