File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -4067,8 +4067,7 @@ static pymol::Result<PyObject*> _getObjectMoleculeNamePyList(
40674067 PyMOLGlobals* G, char const * sele)
40684068{
40694069 if (!sele[0 ]) {
4070- // preserve non-error legacy behavior: Empty selection returns None
4071- return APIAutoNone (nullptr );
4070+ return PyList_New (0 );
40724071 }
40734072 auto tmpsele1 = SelectorTmp::make (G, sele);
40744073 p_return_if_error (tmpsele1);
Original file line number Diff line number Diff line change @@ -344,9 +344,8 @@ def testGetObjectList(self):
344344 self .assertEqual (cmd .get_object_list (' ' ), [])
345345 # empty string is a falsy value
346346 self .assertTrue (not cmd .get_object_list ('' ))
347- # empty string is a silent None
348- # https://github.com/schrodinger/pymol-open-source/issues/478
349- self .assertTrue (cmd .get_object_list ('' ) is None )
347+ # empty string is empty selection
348+ self .assertEqual (cmd .get_object_list ('' ), [])
350349
351350 def testGetObjectList__invalid_selection (self ):
352351 self .assertRaises (CmdException , cmd .get_object_list , 'invalid_selection_name' )
You can’t perform that action at this time.
0 commit comments