
On Wed, Aug 27, 2008 at 07:41:27AM -0400, Yigal Hochberg wrote:
If the PATH is not configured correctly, almost all imports fail and the program crashes/segfualts. The user has no hint of what went wrong.
I think that in this case the program should report an error: "import module [module-name] not found" and exit gracefully.
$ export SMIPATH=/foo $ smilint -s ./IF-MIB ./IF-MIB:6: [1] failed to locate MIB module `SNMPv2-SMI' ./IF-MIB:9: [1] failed to locate MIB module `SNMPv2-TC' ./IF-MIB:11: [1] failed to locate MIB module `SNMPv2-CONF' ./IF-MIB:12: [1] failed to locate MIB module `SNMPv2-MIB' ./IF-MIB:13: [1] failed to locate MIB module `IANAifType-MIB' [...]
It seems to work for me... (0.4.6).
A more user friendly and helpful way to indicate the problem and let the user a chance to fix his/her PATH configuration.
Perhaps additional level 6 messages can be generated at the end of the run. But then the default is not to show level 6 messages. ;-)
/js