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

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1713 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2012-07-10 06:36:54 +00:00
parent 6a8c87d5aa
commit 943e40cce4

View File

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