Proper way to handle errors from python restorecon binding? #434
-
| It's not clear to me in which ways the  Can it raise an exception or does it always simply report errors in it's return code? I.e. I need to do: rc = selinux.restorecon(path)
if rc != 0:
    [error handling]And/or do I need a  I have seen reference to code that calls it as such: try:
  selinux.restorecon(path)
except selinux.SELinuxError:
  [error handling] | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            bachradsusi
          
      
      
        May 14, 2024 
      
    
    Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        bachradsusi
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
https://lists.fedoraproject.org/archives/list/[email protected]/message/E2TGYSKXYATVRFR36PS6EWXGXQUHBAMW/