Description of problem: it is possible to get an etherinfo_obj of a non existing device and when issuing get_ipv6_address python-ethtool will return NULL to python without setting PyErr, and thus generating a SystemError exception. Version-Release number of selected component (if applicable): python-ethtool-0.9-2.fc19.x86_64 How reproducible: 100% Steps to Reproduce: 1. import ethtool dev = ethtool.get_interfaces_info('idontexist')[0] dev.get_ipv6_addresses() Actual results: Python raises a SystemError Expected results: ethtool.get_interfaces_info('idontexist') will return an empty list or raise an IOError ENODEV. Actions on a device that no longer exist (but used to) will raise IOError ENODEV Additional info:
Created attachment 860506 [details] Report invalid/non-existing devices as ENODEV Proposing this patch to fix this issue.
*** Bug 1067705 has been marked as a duplicate of this bug. ***
David, sorry for the duplicate. Is this bug really "MODIFIED"? I do not see the suggested code on the master branch of http://git.fedorahosted.org/cgit/python-ethtool.git/ . Do you have an ETA for a Fedora build with this? At the moment it is quite detrimental to oVirt-3.4.0 on Fedora.
I got this patch reviewed first, as Antoni had already been improving similar code paths earlier. Pushed out to the public git masters: commit 3463fc5556f731aa2e29981bdb27cb50364770dd Author: David Sommerseth <davids> Date: Fri Feb 7 13:53:36 2014 +0100 Report invalid/non-existing devices as ENODEV Without this patch py-ethtool will just report with a very generic system error exception if trying to query a non-existing network interface. This patch will change this to report the error using ENODEV instead. Signed-off-by: David Sommerseth <davids> Reviewed-by: Antoni S. Puimedon <asegurap> This is the same patch as attached to this bz. I'll try to spin a new Fedora package during next week.
Oh, I did not know that you've "forked" http://fedorapeople.org/cgit/dsommers/public_git/python-ethtool.git/ . Thanks for handling this.
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.