Skip to content

Commit 086dda0

Browse files
pmarcelllWyattBlue
authored andcommitted
Use Python 3 compatible stderr logging in Cython
1 parent 85d4a5a commit 086dda0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

av/error.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cimport libav as lib
2+
from libc.stdio cimport fprintf, stderr
23
from libc.stdlib cimport free, malloc
34

45
from av.logging cimport get_last_error
@@ -367,7 +368,7 @@ cdef int stash_exception(exc_info=None):
367368

368369
existing = getattr(_local, "exc_info", None)
369370
if existing is not None:
370-
print >> sys.stderr, "PyAV library exception being dropped:"
371+
fprintf(stderr, "PyAV library exception being dropped:\n")
371372
traceback.print_exception(*existing)
372373
_err_count -= 1 # Balance out the +=1 that is coming.
373374

0 commit comments

Comments
 (0)