Message11024
Using jython 2.7.0, readline.get_history_item() throws an exception.
Test function:
def get_history_items():
import readline
return [readline.get_history_item(i) for i in xrange(1, readline.get_current_history_length() + 1)]
Will throw an exception like:
>>> _get_history_items()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in _get_history_items
File "/opt/jython/Lib/readline.py", line 84, in get_history_item
return _reader.history.get(index-1)
at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
at java.util.LinkedList.get(LinkedList.java:476)
at org.python.jline.console.history.MemoryHistory.get(MemoryHistory.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.IndexOutOfBoundsException: java.lang.IndexOutOfBoundsException: Index: -4, Size: 500
Where the Index: -4 field seems to vary depending on how invocations of readline.get_history_item() |
|
Date |
User |
Action |
Args |
2017-01-17 21:00:57 | kmac | set | recipients:
+ kmac |
2017-01-17 21:00:57 | kmac | set | messageid: <1484686857.35.0.192250688986.issue2541@psf.upfronthosting.co.za> |
2017-01-17 21:00:57 | kmac | link | issue2541 messages |
2017-01-17 21:00:56 | kmac | create | |
|