From 68ba5860744478418b1d784aad8eec99ffc58378 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 8 Dec 2021 09:38:50 +0000 Subject: [PATCH] add check for python3 lib to close #865 --- hardware/PiLcd/package.json | 2 +- hardware/PiLcd/pilcd.js | 2 +- hardware/PiSrf/package.json | 2 +- hardware/PiSrf/pisrf.js | 2 +- hardware/unicorn/package.json | 2 +- hardware/unicorn/unicorn.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hardware/PiLcd/package.json b/hardware/PiLcd/package.json index 510dc78e..d9b1c19e 100644 --- a/hardware/PiLcd/package.json +++ b/hardware/PiLcd/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pilcd", - "version" : "0.2.1", + "version" : "0.3.0", "description" : "A Node-RED node for Raspberry Pi to write to HD44780 style LCD panels.", "dependencies" : { }, diff --git a/hardware/PiLcd/pilcd.js b/hardware/PiLcd/pilcd.js index 4e411623..3f4acbb1 100644 --- a/hardware/PiLcd/pilcd.js +++ b/hardware/PiLcd/pilcd.js @@ -14,7 +14,7 @@ module.exports = function(RED) { RED.log.warn("rpi-lcd : "+RED._("pilcd.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-lcd : "+RED._("pilcd.errors.libnotfound")); allOK = false; } diff --git a/hardware/PiSrf/package.json b/hardware/PiSrf/package.json index bcefd90f..5cfcb8f9 100644 --- a/hardware/PiSrf/package.json +++ b/hardware/PiSrf/package.json @@ -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" : { }, diff --git a/hardware/PiSrf/pisrf.js b/hardware/PiSrf/pisrf.js index a996977e..185aa996 100644 --- a/hardware/PiSrf/pisrf.js +++ b/hardware/PiSrf/pisrf.js @@ -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; } diff --git a/hardware/unicorn/package.json b/hardware/unicorn/package.json index 71a643e6..e8b33756 100644 --- a/hardware/unicorn/package.json +++ b/hardware/unicorn/package.json @@ -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.*" diff --git a/hardware/unicorn/unicorn.js b/hardware/unicorn/unicorn.js index a909c8bf..0014b71c 100644 --- a/hardware/unicorn/unicorn.js +++ b/hardware/unicorn/unicorn.js @@ -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; }