diff mercurial/httppeer.py @ 37669:1cb54e6193a6

py3: paper over differences in future exception handling It looks like Python 3's futures library lacks set_exception_info entirely. We'll just give up and use set_exception in that case. # no-check-commit because the underbar naming is just saner here Differential Revision: https://phab.mercurial-scm.org/D3336
author Augie Fackler <augie@google.com>
date Fri, 13 Apr 2018 18:17:45 -0400
parents 8cea0d57bf37
children 0664be4f0c1f
line wrap: on
line diff
--- a/mercurial/httppeer.py	Sat Apr 14 02:06:03 2018 +0530
+++ b/mercurial/httppeer.py	Fri Apr 13 18:17:45 2018 -0400
@@ -754,7 +754,8 @@
                         try:
                             result.append(decoder.decode())
                         except Exception:
-                            f.set_exception_info(*sys.exc_info()[1:])
+                            pycompat.future_set_exception_info(
+                                f, sys.exc_info()[1:])
                             continue
                 else:
                     result.append(meta['data'])