qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject qpid-proton git commit: added next for compatibility between c python and jython
Date Tue, 27 Jan 2015 16:16:18 GMT
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 <rhs@alum.mit.edu>
Authored: Tue Jan 27 11:16:11 2015 -0500
Committer: Rafael Schloming <rhs@alum.mit.edu>
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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message