diff mercurial/profiling.py @ 30322:189a1030affb

profiling: obtain stderr from ui This will help Python 3 porting.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 20 Oct 2016 22:07:03 +0900
parents 3fd53cc1aad8
children 69acfd2ca11e
line wrap: on
line diff
--- 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':