[Jython-checkins] jython (2.5): #1481 Fix IllegalArgumentException instead of ValueError.
frank.wierzbicki
jython-checkins at python.org
Wed Feb 6 21:11:45 CET 2013
http://hg.python.org/jython/rev/328c4e80117f
changeset: 7001:328c4e80117f
branch: 2.5
parent: 6999:3345d6e15c79
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Wed Feb 06 12:09:54 2013 -0800
summary:
#1481 Fix IllegalArgumentException instead of ValueError.
Thanks Andreas Stührk!
files:
ACKNOWLEDGMENTS | 1 +
NEWS | 1 +
src/org/python/modules/time/Time.java | 5 +++++
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ACKNOWLEDGMENTS b/ACKNOWLEDGMENTS
--- a/ACKNOWLEDGMENTS
+++ b/ACKNOWLEDGMENTS
@@ -93,6 +93,7 @@
Costantino Cerbo
Alex Groenholm
Anselm Kruis
+ Andreas Stührk
Local Variables:
mode: indented-text
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@
Jython 2.5.4rc1
Bugs Fixed
+ - [ 1481 ] jython throws java.lang.IllegalArgumentException instead of ValueError.
- [ 1716 ] xrange slicing raises NPE.
Jython 2.5.3rc1
diff --git a/src/org/python/modules/time/Time.java b/src/org/python/modules/time/Time.java
--- a/src/org/python/modules/time/Time.java
+++ b/src/org/python/modules/time/Time.java
@@ -780,6 +780,11 @@
builder.append("'");
inQuote = needsQuote;
}
+ if (charAt == '\'') {
+ // a single quote always needs to be escaped, regardless
+ // whether already in a quote or not
+ builder.append("'");
+ }
builder.append(charAt);
continue;
} else if (inQuote) {
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list