Update sensehat.js (#933)

check for sensehat python lib in 2.7 and 3 folders
This commit is contained in:
Sam Machin 2022-07-15 14:12:46 +01:00 committed by GitHub
parent c9f57afe22
commit e7c0459a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ module.exports = function(RED) {
var hatCommand = __dirname+'/sensehat';
if (!fs.existsSync('/usr/lib/python2.7/dist-packages/sense_hat')) {
if (!fs.existsSync('/usr/lib/python2.7/dist-packages/sense_hat') && !fs.existsSync('/usr/lib/python3/dist-packages/sense_hat')) {
throw "Error: Can't find Sense HAT python libraries. Run sudo apt-get install sense-hat";
}