New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having a newer kernel version installed kinda throws an exception #7
Comments
Will have a look into it, thanks for the bug report! |
Can you ask your friend to send me the kernel release text string? |
I've added a fix based on your recommendation, can you and your friends try it out? |
uname -r: On Mon, Nov 18, 2013 at 9:43 AM, Savvas Radevic notifications@github.comwrote:
Cu stimă, |
OK, it's fixed now, I wasn't using str.replace() properly, I have to use re.sub() for regular expressions. |
I've recommended your script to my friends and on some forums and on of them asked me why the script gave him this error:
"Contacting http://kernel.ubuntu.com/~kernel-ppa/mainline/
Please enter an integer [0]: 0
Please enter an integer [0]: 0
Please enter an integer [0]:
Traceback (most recent call last):
File "kmpd.py", line 96, in
print("You chose: {0}".format(kernels[selk-1]))
IndexError: list index out of range"
Reading the script and testing my theory I found that when you have a newer version installed than what version is available on the site leaves you with only one choice: killing the script.
My toughts are that it would be better to make a check and if the versions are equal, to print and inform the user that no newer kernel is available and then exit.
I've tried with no success to fiddle with the program and make it exit to shell.
Also, if you are running a custom kernel, altough comparing works, I think that it is better to use re.sub(r"-[\w]*","",platform.release()) instead of platform.release().replace("-generic","").
The text was updated successfully, but these errors were encountered: