Fix ignore Net-SNMP configuration file snmp.conf option in t/test_class.pl and t/util/test_class_mocked.pl

This commit is contained in:
Eric A. Miller
2013-10-15 22:26:51 -04:00
parent 4b1533e925
commit 074f2e7c8f
2 changed files with 4 additions and 6 deletions

View File

@@ -71,8 +71,8 @@ if ( $ignore && !defined $mibdirs ) {
pod2usage(1);
}
if ($ignore) { local $ENV{'SNMPCONFPATH'} = $EMPTY }
if ($ignore) { local $ENV{'MIBDIRS'} = "$mibdirs" }
local $ENV{'SNMPCONFPATH'} = $EMPTY if $ignore;
local $ENV{'MIBDIRS'} = "$mibdirs" if $ignore;
if ( defined $mibdirs ) {
SNMP::addMibDirs($mibdirs);
@@ -99,7 +99,6 @@ my $dev = $class->new(
'AutoSpecify' => 0,
'BulkWalk' => 0,
'Debug' => $debug,
'MibDirs' => $mibdirs,
'Session' => $mocked,
) or die "\n";