Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: mojo/public/python/mojo_bindings/promise.py

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 Promise used by the python bindings. 6 Promise used by the python bindings.
7 7
8 The API is following the ECMAScript 6 API for promises. 8 The API is following the ECMAScript 6 API for promises.
9 """ 9 """
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 try: 187 try:
188 if action: 188 if action:
189 resolve(action(x)) 189 resolve(action(x))
190 else: 190 else:
191 resolve(x) 191 resolve(x)
192 except Exception as e: 192 except Exception as e:
193 # Adding traceback similarly to python 3.0 (pep-3134) 193 # Adding traceback similarly to python 3.0 (pep-3134)
194 e.__traceback__ = sys.exc_info()[2] 194 e.__traceback__ = sys.exc_info()[2]
195 reject(e) 195 reject(e)
196 return _Run 196 return _Run
OLDNEW
« no previous file with comments | « mojo/public/python/mojo_bindings/messaging.py ('k') | mojo/public/python/mojo_bindings/reflection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698