e5d3bb5 python: Streamline py_get_lockspaces()

Authored and Committed by nsoffer 4 years ago
    python: Streamline py_get_lockspaces()
    
    py_get_lockspaces() was using the same error prone error cleanup as
    hosts_to_list(), mixed with code to call sanlock, to make the code
    harder to follow.
    
    Extract lockspaces_to_list() helper, implemented exactly like
    hosts_to_list. This simplify py_get_lockspaces() and allow using the
    simpler finally pattern we used in other functions.
    
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    
        
file modified
+40 -36