mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-24 09:09:19 +00:00
Correct "Cannot load UNDEFINED module" message, if module X is buggy.
git-svn-id: https://svn.fhem.de/fhem/trunk@1726 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
18496049f8
commit
099c95f98a
@ -1203,7 +1203,9 @@ CommandDefine($$)
|
||||
}
|
||||
}
|
||||
|
||||
$m = LoadModule($m);
|
||||
my $newm = LoadModule($m);
|
||||
return "Cannot load module $m" if($newm eq "UNDEFINED");
|
||||
$m = $newm;
|
||||
|
||||
if(!$modules{$m} || !$modules{$m}{DefFn}) {
|
||||
my @m = grep { $modules{$_}{DefFn} || !$modules{$_}{LOADED} }
|
||||
@ -2533,13 +2535,14 @@ EventMapAsList($)
|
||||
return split($sc, $em);
|
||||
}
|
||||
|
||||
#######################
|
||||
# $dir: 0 = User to Fhem (i.e. set), 1 = Fhem to User (i.e trigger)
|
||||
sub
|
||||
ReplaceEventMap($$$)
|
||||
{
|
||||
my ($dev, $str, $dir) = @_;
|
||||
my $em = $attr{$dev}{eventMap};
|
||||
return $str if(!$em);
|
||||
return $str if(!$em || (!$dir && $str->[1] eq "?"));
|
||||
my $dname = shift @{$str} if(!$dir);
|
||||
|
||||
my $nstr = join(" ", @{$str}) if(!$dir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user