summaryrefslogtreecommitdiffstats
path: root/repo_trace.py
diff options
context:
space:
mode:
Diffstat (limited to 'repo_trace.py')
-rw-r--r--repo_trace.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/repo_trace.py b/repo_trace.py
index f5bc76d4..cd571f4c 100644
--- a/repo_trace.py
+++ b/repo_trace.py
@@ -28,13 +28,16 @@ REPO_TRACE = 'REPO_TRACE'
28 28
29_TRACE = os.environ.get(REPO_TRACE) == '1' 29_TRACE = os.environ.get(REPO_TRACE) == '1'
30 30
31
31def IsTrace(): 32def IsTrace():
32 return _TRACE 33 return _TRACE
33 34
35
34def SetTrace(): 36def SetTrace():
35 global _TRACE 37 global _TRACE
36 _TRACE = True 38 _TRACE = True
37 39
40
38def Trace(fmt, *args): 41def Trace(fmt, *args):
39 if IsTrace(): 42 if IsTrace():
40 print(fmt % args, file=sys.stderr) 43 print(fmt % args, file=sys.stderr)