projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f874102
)
Adjust NoteIndexList._index in .index() if it falls off the end of the list.
author
W. Trevor King
<wking@drexel.edu>
Thu, 10 Nov 2011 17:12:56 +0000
(12:12 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Thu, 10 Nov 2011 17:12:56 +0000
(12:12 -0500)
hooke/playlist.py
patch
|
blob
|
history
diff --git
a/hooke/playlist.py
b/hooke/playlist.py
index f323ca2b099043875c384e9fcd4831d4288cd495..52d8df1352e6077ae77651512a8eab1305ba3718 100644
(file)
--- a/
hooke/playlist.py
+++ b/
hooke/playlist.py
@@
-88,6
+88,8
@@
class NoteIndexList (list):
is `None`.
"""
if value == None:
+ if self._index >= len(self): # perhaps items have been popped
+ self._index = len(self) - 1
return self._index
return super(NoteIndexList, self).index(value, *args, **kwargs)