Show More
@@ -28,7 +28,17 b' def log(whencefmt, *whenceargs):' | |||||
28 | _session = os.environ.get('HGCATAPULTSESSION', 'none') |
|
28 | _session = os.environ.get('HGCATAPULTSESSION', 'none') | |
29 | whence = whencefmt % whenceargs |
|
29 | whence = whencefmt % whenceargs | |
30 | try: |
|
30 | try: | |
31 | _pipe.write('START %s %s\n' % (_session, whence)) |
|
31 | # Both writes to the pipe are wrapped in try/except to ignore | |
|
32 | # errors, as we can see mysterious errors in here if the pager | |||
|
33 | # is active. Presumably other conditions could trigger | |||
|
34 | # problems too. | |||
|
35 | try: | |||
|
36 | _pipe.write('START %s %s\n' % (_session, whence)) | |||
|
37 | except IOError: | |||
|
38 | pass | |||
32 | yield |
|
39 | yield | |
33 | finally: |
|
40 | finally: | |
34 | _pipe.write('END %s %s\n' % (_session, whence)) |
|
41 | try: | |
|
42 | _pipe.write('END %s %s\n' % (_session, whence)) | |||
|
43 | except IOError: | |||
|
44 | pass |
General Comments 0
You need to be logged in to leave comments.
Login now