[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 1/2] Fix typo logging failure to get default file context.



On 12/15/2009 01:28 PM, David Lehman wrote:
> ---
>  isys/isys.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/isys/isys.py b/isys/isys.py
> index df7fb8f..14d2a5d 100755
> --- a/isys/isys.py
> +++ b/isys/isys.py
> @@ -603,7 +603,7 @@ def matchPathContext(fn):
>      try:
>          con = selinux.matchpathcon(os.path.normpath(fn), 0)[1]
>      except OSError:
> -        log.info("failed to get default SELinux context for %s" % f)
> +        log.info("failed to get default SELinux context for %s" % fn)

I'd prefer:

except OSError, e:
  log.info("failed to get default SELinux context for %s: %s" % (fn,e))

It's true that they're not always useful, but occasionally having the
error code really helps here.

-- 
        Peter

When privacy is outlawed only outlaws will have privacy.
		-- Zimmermann


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]