| Index: mojo/public/python/mojo/bindings/promise.py
|
| diff --git a/mojo/public/python/mojo/bindings/promise.py b/mojo/public/python/mojo/bindings/promise.py
|
| index ebf6f85e0dcc034f3346a8a2197170012831bb2b..c5d7d7cb641945e14af53d1b1d5e681db57d21b2 100644
|
| --- a/mojo/public/python/mojo/bindings/promise.py
|
| +++ b/mojo/public/python/mojo/bindings/promise.py
|
| @@ -7,8 +7,6 @@
|
|
|
| The API is following the ECMAScript 6 API for promises.
|
| """
|
| -
|
| -import sys
|
|
|
|
|
| class Promise(object):
|
| @@ -35,12 +33,8 @@
|
| self._onRejected = []
|
| self._state = Promise.STATE_PENDING
|
| self._result = None
|
| - try:
|
| + if generator_function:
|
| generator_function(self._Resolve, self._Reject)
|
| - except Exception as e:
|
| - # Adding traceback similarly to python 3.0 (pep-3134)
|
| - e.__traceback__ = sys.exc_info()[2]
|
| - self._Reject(e)
|
|
|
| @staticmethod
|
| def Resolve(value):
|
| @@ -190,7 +184,5 @@
|
| else:
|
| resolve(x)
|
| except Exception as e:
|
| - # Adding traceback similarly to python 3.0 (pep-3134)
|
| - e.__traceback__ = sys.exc_info()[2]
|
| reject(e)
|
| return _Run
|
|
|