'Removing editorstack only if it\'s not the last remaining'

def unregister_editorstack(self, editorstack):

    self.remove_last_focus_editorstack(editorstack)
    if (len(self.editorstacks) > 1):
        index = self.editorstacks.index(editorstack)
        self.editorstacks.pop(index)
        return True
    else:
        return False
