Mercurial > hg
comparison hgext/infinitepush/__init__.py @ 43363:2ded39ef5bf7 stable
py3: fix exception message encoding in infinitepush
Differential Revision: https://phab.mercurial-scm.org/D7195
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> |
---|---|
date | Fri, 01 Nov 2019 17:39:17 +0100 |
parents | e5d535621ee1 |
children | 9f70512ae2cf |
comparison
equal
deleted
inserted
replaced
43362:ddfd0f3956f4 | 43363:2ded39ef5bf7 |
---|---|
957 except Exception as e: | 957 except Exception as e: |
958 logger( | 958 logger( |
959 service, | 959 service, |
960 eventtype=b'failure', | 960 eventtype=b'failure', |
961 elapsedms=(time.time() - start) * 1000, | 961 elapsedms=(time.time() - start) * 1000, |
962 errormsg=str(e), | 962 errormsg=stringutil.forcebytestr(e), |
963 **kwargs | 963 **kwargs |
964 ) | 964 ) |
965 raise | 965 raise |
966 | 966 |
967 | 967 |
1221 except Exception as e: | 1221 except Exception as e: |
1222 log( | 1222 log( |
1223 scratchbranchparttype, | 1223 scratchbranchparttype, |
1224 eventtype=b'failure', | 1224 eventtype=b'failure', |
1225 elapsedms=(time.time() - parthandlerstart) * 1000, | 1225 elapsedms=(time.time() - parthandlerstart) * 1000, |
1226 errormsg=str(e), | 1226 errormsg=stringutil.forcebytestr(e), |
1227 ) | 1227 ) |
1228 raise | 1228 raise |
1229 finally: | 1229 finally: |
1230 if bundle: | 1230 if bundle: |
1231 bundle.close() | 1231 bundle.close() |