Message307704
| Author |
xdegaye |
| Recipients |
barry, serhiy.storchaka, xdegaye |
| Date |
2017年12月06日.07:06:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1512543983.31.0.213398074469.issue32199@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Whatever the change made to fix this issue, it is not possible to add a test case for this change.
So following the suggestion made by Barry in PR 4696, we can add (in another issue) a new keyword parameter to getnode() named 'methods' whose value may be None (the default, meaning try all the known methods) or a tuple containing a subset of the following methods ('unix', 'ifconfig', 'ip', 'arp', 'lanscan', 'netstat', 'random') that would raise an exception if the value cannot be obtained using one of the requested method tried in the requested order. This would also improve the documentation on the methods getnode() is using. Then if we decide to make the change for 'ip link' in the current issue, one can add a test case that would first test for the avaibility of the ip command and if the command exists would fail if getnode(methods=('ip',)) raises an exception. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年12月06日 07:06:23 | xdegaye | set | recipients:
+ xdegaye, barry, serhiy.storchaka |
| 2017年12月06日 07:06:23 | xdegaye | set | messageid: <1512543983.31.0.213398074469.issue32199@psf.upfronthosting.co.za> |
| 2017年12月06日 07:06:23 | xdegaye | link | issue32199 messages |
| 2017年12月06日 07:06:22 | xdegaye | create |
|