[rhinstaller/anaconda/pulls/104 master] Fix IndexError: list index out of range (#1219004)
jkonecny12
installerbot-noreply at redhat.com
Wed May 13 07:20:46 UTC 2015
> why check keyid < 0 since a negative index is valid in Python?
Yes it's valid but it's confusing for the user. I think it's better to set nothing than set something confusing.
> why is an IndexError accessing in _regions array considered a normal behavior...i.e. why is the int key that is out of array bounds still useful to input()'s caller
I think this is normal behavior of event processing. There is possible to return ``INPUT_PROCESSED`` instead but I think it's not so clean as this solution. What if someone add some special option later or add default choice to 0 key.
> what about the access that uses keyid in self._timezones[args][keyid] expression? why is it not necessary to worry about IndexError in that case?
Yeah that is my fail. I'll fix the pull request because now it's crashing in the inner choice :( . Sorry for that.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/104
More information about the anaconda-patches
mailing list