profiling: obtain stderr from ui
authorYuya Nishihara <yuya@tcha.org>
Thu, 20 Oct 2016 22:07:03 +0900
changeset 30332 189a1030affb
parent 30331 e1d6aa0e4c3a
child 30333 5f7d13d3bd4d
profiling: obtain stderr from ui This will help Python 3 porting.
mercurial/profiling.py
--- a/mercurial/profiling.py	Sun Nov 06 18:51:57 2016 -0800
+++ b/mercurial/profiling.py	Thu Oct 20 22:07:03 2016 +0900
@@ -9,7 +9,6 @@
 
 import contextlib
 import os
-import sys
 import time
 
 from .i18n import _
@@ -136,7 +135,7 @@
         path = ui.expandpath(output)
         fp = open(path, 'wb')
     else:
-        fp = sys.stderr
+        fp = ui.ferr
 
     try:
         if profiler == 'ls':