mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-22 14:02:17 +00:00
python/chcat: remove unnecessary assignment
chcat_add() defines variable cmd twice before calling
subprocess.check_call(cmd, ...). Remove the first definition.
This bug was found using lgtm.com analyzer:
eac5e661ca/files/python/chcat/chcat (L118)
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
dddd28e90b
commit
af67fa5d95
@ -115,7 +115,6 @@ def chcat_add(orig, newcat, objects, login_ind):
|
||||
errors = 0
|
||||
sensitivity = newcat[0]
|
||||
cat = newcat[1]
|
||||
cmd = 'chcon -l %s' % sensitivity
|
||||
for f in objects:
|
||||
(rc, c) = selinux.getfilecon(f)
|
||||
con = c.split(":")[3:]
|
||||
|
Loading…
Reference in New Issue
Block a user