53f7f02 python: Fail with ValueError if disk path is too long

Authored and Committed by nsoffer 4 years ago
    python: Fail with ValueError if disk path is too long
    
    Previously if a path was too long, we truncated the path silently. This
    probably fail when sanlock try to access non-existing path with "No such
    path or directory" error. If you are unlucky, this could try to access
    the wrong path, failing with bogus error, returning wrong data, or
    worse, writing a resource into the wrong location, destroying existing
    data.
    
    Now we fail immediately with:
    
        ValueError: Path is too long: '/too/long/path/...'
    
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    
        
file modified
+17 -0
file modified
+0 -7