mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 03:30:05 -05:00
Move most warning/info statements to stderr
This commit is contained in:
parent
9bcfc36b7a
commit
29c595ddc5
@ -1,5 +1,6 @@
|
|||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
@ -273,8 +274,8 @@ class X264Output(Output, ClsMod):
|
|||||||
try:
|
try:
|
||||||
subp.stdin.write(buffer(buf))
|
subp.stdin.write(buffer(buf))
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
print 'Exception while writing. Log:'
|
print >> sys.stderr, 'Exception while writing. Log:'
|
||||||
print subp.stderr.read()
|
print >> sys.stderr, subp.stderr.read()
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
def encode(self, buf):
|
def encode(self, buf):
|
||||||
@ -388,8 +389,8 @@ class VPxOutput(Output, ClsMod):
|
|||||||
try:
|
try:
|
||||||
subp.stdin.write(buffer(buf))
|
subp.stdin.write(buffer(buf))
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
print 'Exception while writing. Log:'
|
print >> sys.stderr, 'Exception while writing. Log:'
|
||||||
print subp.stderr.read()
|
print >> sys.stderr, subp.stderr.read()
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
def encode(self, buf):
|
def encode(self, buf):
|
||||||
|
@ -352,7 +352,7 @@ class RenderManager(ClsMod):
|
|||||||
# Do a blocking sync to free up resources. This may slightly reduce
|
# Do a blocking sync to free up resources. This may slightly reduce
|
||||||
# parallelism but makes it a whole heck of a lot easier to keep
|
# parallelism but makes it a whole heck of a lot easier to keep
|
||||||
# using the computer while things render.
|
# using the computer while things render.
|
||||||
print 'Launches became blocking, synchronizing'
|
print >> sys.stderr, 'Launches became blocking, synchronizing'
|
||||||
iter_stream_right.synchronize()
|
iter_stream_right.synchronize()
|
||||||
|
|
||||||
# Make sure the other stream is done flushing before we start
|
# Make sure the other stream is done flushing before we start
|
||||||
|
10
main.py
10
main.py
@ -74,8 +74,8 @@ def main(args, prof):
|
|||||||
if getattr(file_like, 'close', None):
|
if getattr(file_like, 'close', None):
|
||||||
file_like.close()
|
file_like.close()
|
||||||
for key, val in log:
|
for key, val in log:
|
||||||
print '\n=== %s ===' % key
|
print >> sys.stderr, '\n=== %s ===' % key
|
||||||
print val
|
print >> sys.stderr, val
|
||||||
|
|
||||||
evt = buf = next_evt = next_buf = None
|
evt = buf = next_evt = next_buf = None
|
||||||
for idx, t in enumerate(list(times) + [None]):
|
for idx, t in enumerate(list(times) + [None]):
|
||||||
@ -98,12 +98,12 @@ def main(args, prof):
|
|||||||
os.rename(args.rawfn + '.tmp', args.rawfn)
|
os.rename(args.rawfn + '.tmp', args.rawfn)
|
||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
print 'Failed to write %s: %s' % (
|
print >> sys.stderr, 'Failed to write %s: %s' % (
|
||||||
args.rawfn, traceback.format_exc())
|
args.rawfn, traceback.format_exc())
|
||||||
print '%s%s (%3d/%3d), %dms' % (
|
print >> sys.stderr, '%s%s (%3d/%3d), %dms' % (
|
||||||
('%d: ' % args.device) if args.device >= 0 else '',
|
('%d: ' % args.device) if args.device >= 0 else '',
|
||||||
name, idx, len(times), last_render_time_ms)
|
name, idx, len(times), last_render_time_ms)
|
||||||
sys.stdout.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
save(None)
|
save(None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user