mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
00_LIRC.pm: do not crash fhem if there is no /etc/lirc (Forum #95324)
git-svn-id: https://svn.fhem.de/fhem/trunk@18140 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c50c2fbcfc
commit
6643d750e7
@ -43,13 +43,17 @@ LIRC_Define($$)
|
||||
my $config = $a[2];
|
||||
|
||||
Log3 $name, 3, "LIRC opening $name device $config";
|
||||
my $lirc = Lirc::Client->new({
|
||||
my $lirc;
|
||||
eval {
|
||||
$lirc = Lirc::Client->new({
|
||||
prog => 'fhem',
|
||||
rcfile => "$config",
|
||||
debug => 0,
|
||||
fake => 0,
|
||||
});
|
||||
return "Can't open $config: $!\n" if(!$lirc);
|
||||
};
|
||||
return "Error initializing Lirc::Client: $@" if($@);
|
||||
return "Can't open $config: $!" if(!$lirc);
|
||||
Log3 $name, 3, "LIRC opened $name device $config";
|
||||
|
||||
my $select = IO::Select->new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user