add check for python3 lib

to close #865
This commit is contained in:
Dave Conway-Jones
2021-12-08 09:38:50 +00:00
parent 1293a865c1
commit 68ba586074
6 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-pisrf",
"version" : "0.1.7",
"version" : "0.2.0",
"description" : "A Node-RED node for a Raspberry Pi to use a SRF04 or SRF05 range finder",
"dependencies" : {
},

View File

@@ -14,7 +14,7 @@ module.exports = function(RED) {
RED.log.warn("rpi-srf : "+RED._("node-red:rpi-gpio.errors.ignorenode"));
allOK = false;
}
else if (!fs.existsSync("/usr/share/doc/python-rpi.gpio")) {
else if (!fs.existsSync("/usr/share/doc/python-rpi.gpio") && !fs.existsSync("/usr/share/doc/python3-rpi.gpio")) {
RED.log.warn("rpi-srf : "+RED._("node-red:rpi-gpio.errors.libnotfound"));
allOK = false;
}