mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 22:25:48 -04:00
update to nwgeom.py to fix NoneType error.
None is returned by rtdb_get(name) if name is not in the rtdb variables. This leads to failure of the previous behaviour which expects NWChemError to be raised.
This commit is contained in:
parent
1c72592ee9
commit
bec27a0cd3
1 changed files with 4 additions and 0 deletions
|
|
@ -11,6 +11,8 @@ def geom_get_coords(name):
|
|||
actualname = rtdb_get(name)
|
||||
except NWChemError:
|
||||
actualname = name
|
||||
if actualname is None:
|
||||
actualname = name
|
||||
coords = rtdb_get('geometry:' + actualname + ':coords')
|
||||
units = rtdb_get('geometry:'+actualname+':user units')
|
||||
if (units == 'a.u.'):
|
||||
|
|
@ -35,6 +37,8 @@ def geom_set_coords(name,coords):
|
|||
actualname = rtdb_get(name)
|
||||
except NWChemError:
|
||||
actualname = name
|
||||
if actualname is None:
|
||||
actualname = name
|
||||
units = rtdb_get('geometry:'+actualname+':user units')
|
||||
if (units == 'a.u.'):
|
||||
factor = 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue