Show More
@@ -151,6 +151,7 b' class profile(object):' | |||
|
151 | 151 | self._ui = ui |
|
152 | 152 | self._output = None |
|
153 | 153 | self._fp = None |
|
154 | self._fpdoclose = True | |
|
154 | 155 | self._profiler = None |
|
155 | 156 | self._enabled = enabled |
|
156 | 157 | self._entered = False |
@@ -193,6 +194,7 b' class profile(object):' | |||
|
193 | 194 | path = self._ui.expandpath(self._output) |
|
194 | 195 | self._fp = open(path, 'wb') |
|
195 | 196 | else: |
|
197 | self._fpdoclose = False | |
|
196 | 198 | self._fp = self._ui.ferr |
|
197 | 199 | |
|
198 | 200 | if proffn is not None: |
@@ -221,4 +223,5 b' class profile(object):' | |||
|
221 | 223 | self._closefp() |
|
222 | 224 | |
|
223 | 225 | def _closefp(self): |
|
224 | self._fp.close() | |
|
226 | if self._fpdoclose and self._fp is not None: | |
|
227 | self._fp.close() |
General Comments 0
You need to be logged in to leave comments.
Login now