Bonjour,
Sous Debian moi aussi, et moi aussi avec Python3, j’ai modifié les scripts.
Ca marche chez moi.
J’ai essayé de les réécrire compatibles python2 ET python3, ce qui est vrai sauf pour le script.php
J’apporte ma petite configuration avec les diff des fichiers modifiés:
========= ./resources/install_apt.sh
35c35,42
< sudo python -m compileall -f "$basename/smartJHDaemon"
---
> if ! command -v python &> /dev/null
> then
> # Python 3
> sudo python3 -m compileall -f "$basename/smartJHDaemon"
> else
> # Python 2
> sudo python -m compileall -f "$basename/smartJHDaemon"
> fi
========= ./resources/smartJHDaemon/lib/encryption/encryption.py
38c38
< def encode (self, text):
---
> def encode (self, text):
========= ./resources/smartJHDaemon/lib/encryption/aes_decrypt.py
67,74c67,74
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L,
< 0L,0L,0L,0L,0L,0L,0L,0L
---
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0
========= ./resources/smartJHDaemon/smartJHDaemon.py
4c4,9
< import SocketServer as socketserver
---
> # Python 2+3
> try:
> import SocketServer as socketserver
> except ImportError:
> import socketserver
>
========= ./core/class/TvDomSamsung.class.php
37c37
< const EXEC_PATH = 'python ' . __DIR__ . '/../../resources/smartJHDaemon/smartJHDaemon.pyc';
---
> const EXEC_PATH = 'python3 ' . __DIR__ . '/../../resources/smartJHDaemon/smartJHDaemon.pyc';
71c71
< if (exec('which python | wc -l') != 0) {
---
> if (exec('which python3 | wc -l') != 0) {
594c594
< ?>
\ Pas de fin de ligne à la fin du fichier
---
> ?>