summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2013-10-22 09:35:50 -0700
committerPaul Moore <pmoore@redhat.com>2013-10-22 14:24:44 -0400
commit8e1b4634733dcd59713c43d7d1e53c277767b2fb (patch)
treeb17aaaa1f6a6e97700691051125b73ba2d9da7d6 /src
parent9de19061978d990dc9fc25a20e145218cf66806c (diff)
downloadlibseccomp-8e1b4634733dcd59713c43d7d1e53c277767b2fb.tar.gz
python: Remove file object support from Arg
It's still possible to pass file descriptors into the Arg data, but safe uses are already complicated enough that making the user call fileno() themselves seems reasonable. Signed-off-by: Andy Lutomirski <luto@amacapital.net> (corrected the python test cases to take into account the change) Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/python/seccomp.pyx10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx
index ed7c1bb..47d2ae1 100644
--- a/src/python/seccomp.pyx
+++ b/src/python/seccomp.pyx
@@ -165,14 +165,8 @@ cdef class Arg:
"""
self._arg.arg = arg
self._arg.op = op
- if isinstance(datum_a, file):
- self._arg.datum_a = datum_a.fileno()
- else:
- self._arg.datum_a = datum_a
- if isinstance(datum_b, file):
- self._arg.datum_b = datum_b.fileno()
- else:
- self._arg.datum_b = datum_b
+ self._arg.datum_a = datum_a
+ self._arg.datum_b = datum_b
def to_c(self):
""" Convert the object into a C structure.