2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

Don't die if Device::Serialport is not installed, just cry.

git-svn-id: https://svn.fhem.de/fhem/trunk@1713 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-07-10 06:36:54 +00:00
parent 9fccdf3e37
commit a79ab93e85

View File

@ -159,11 +159,19 @@ DevIo_OpenDev($$$)
if ($^O=~/Win/) {
require Win32::SerialPort;
$po = new Win32::SerialPort ($dev);
eval {
require Win32::SerialPort;
$po = new Win32::SerialPort ($dev);
}
} else {
require Device::SerialPort;
$po = new Device::SerialPort ($dev);
eval {
require Device::SerialPort;
$po = new Device::SerialPort ($dev);
}
}
if($@) {
Log 1, $@;
return $@;
}
if(!$po) {