Mercurial > hg
comparison mercurial/profiling.py @ 43732:882e633ac92c
profiling: add a missing argument to the ProgrammingError constructor
Differential Revision: https://phab.mercurial-scm.org/D7470
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 21 Nov 2019 15:39:03 -0500 |
parents | 6c8ba31405d9 |
children | d6d4170882cd |
comparison
equal
deleted
inserted
replaced
43731:6c8ba31405d9 | 43732:882e633ac92c |
---|---|
202 | 202 |
203 The profiling will stop at the context exit. | 203 The profiling will stop at the context exit. |
204 | 204 |
205 If the profiler was already started, this has no effect.""" | 205 If the profiler was already started, this has no effect.""" |
206 if not self._entered: | 206 if not self._entered: |
207 raise error.ProgrammingError() | 207 raise error.ProgrammingError(b'use a context manager to start') |
208 if self._started: | 208 if self._started: |
209 return | 209 return |
210 self._started = True | 210 self._started = True |
211 profiler = encoding.environ.get(b'HGPROF') | 211 profiler = encoding.environ.get(b'HGPROF') |
212 proffn = None | 212 proffn = None |