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-pi-unicorn-hat",
"version" : "0.0.23",
"version" : "0.1.0",
"description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.",
"dependencies" : {
"pngjs": "2.2.*"

View File

@@ -15,7 +15,7 @@ module.exports = function(RED) {
RED.log.warn("rpi-unicorn : "+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-unicorn : "+RED._("node-red:rpi-gpio.errors.libnotfound"));
allOK = false;
}