Repository: qpid-proton Updated Branches: refs/heads/master 2f25cc0e8 -> c098bf0dd
added next for compatibility between c python and jython Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/c098bf0d Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/c098bf0d Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/c098bf0d Branch: refs/heads/master Commit: c098bf0dd904d58f0339034345aae9cd01ea7005 Parents: 2f25cc0 Author: Rafael Schloming <[email protected]> Authored: Tue Jan 27 11:16:11 2015 -0500 Committer: Rafael Schloming <[email protected]> Committed: Tue Jan 27 11:16:11 2015 -0500 ---------------------------------------------------------------------- proton-j/src/main/resources/cproton.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c098bf0d/proton-j/src/main/resources/cproton.py ---------------------------------------------------------------------- diff --git a/proton-j/src/main/resources/cproton.py b/proton-j/src/main/resources/cproton.py index ee1f828..7217f2e 100644 --- a/proton-j/src/main/resources/cproton.py +++ b/proton-j/src/main/resources/cproton.py @@ -38,3 +38,17 @@ from cmessenger import * from cmessage import * from curl import * from chandlers import * + +# XXX: this is for compatibility, apparently the version of jython we +# use doesn't have next, we should remove this when we upgrade + +_DEF = object() + +def next(iter, default=_DEF): + try: + return iter.next() + except StopIteration: + if default is _DEF: + raise + else: + return default --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
