[Jython-checkins] jython: Fix Python issue 6089: Only '.' or '[' may follow ']' in format field specifier.

nicholas.riley jython-checkins at python.org
Wed Mar 21 21:10:02 CET 2012


http://hg.python.org/jython/rev/8689a050db18
changeset:   6454:8689a050db18
user:        Nicholas Riley <njriley at illinois.edu>
date:        Wed Mar 21 15:41:56 2012 -0400
summary:
  Fix Python issue 6089: Only '.' or '[' may follow ']' in format field specifier.

http://bugs.python.org/issue6089

files:
  src/org/python/core/stringlib/FieldNameIterator.java |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/src/org/python/core/stringlib/FieldNameIterator.java b/src/org/python/core/stringlib/FieldNameIterator.java
--- a/src/org/python/core/stringlib/FieldNameIterator.java
+++ b/src/org/python/core/stringlib/FieldNameIterator.java
@@ -88,6 +88,8 @@
             parseItemChunk(chunk);
         } else if (markup.charAt(index) == '.') {
             parseAttrChunk(chunk);
+        } else {
+            throw new IllegalArgumentException("Only '.' or '[' may follow ']' in format field specifier");
         }
         return chunk;
     }

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list