Skip to content

Commit

Permalink
fix python3 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Aug 19, 2023
1 parent 0aa79c8 commit 1e4afe3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions desktop/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $("#table_cmd").sortable({
/* Fonction permettant l'affichage des commandes dans l'équipement */
function addCmdToTable(_cmd) {
if (!isset(_cmd)) {
var _cmd = {configuration: {}}
var _cmd = { configuration: {} }
}
if (!isset(_cmd.configuration)) {
_cmd.configuration = {}
Expand Down Expand Up @@ -61,22 +61,22 @@ function addCmdToTable(_cmd) {
tr += '</div>'
tr += '</td>'
tr += '<td>';
tr += '<span class="cmdAttr" data-l1key="htmlstate"></span>';
tr += '<span class="cmdAttr" data-l1key="htmlstate"></span>';
tr += '</td>';
tr += '<td>'
if (is_numeric(_cmd.id)) {
tr += '<a class="btn btn-default btn-xs cmdAction" data-action="configure"><i class="fas fa-cogs"></i></a> '
tr += '<a class="btn btn-default btn-xs cmdAction" data-action="test"><i class="fas fa-rss"></i> Tester</a>'
tr += '<a class="btn btn-default btn-xs cmdAction" data-action="test"><i class="fas fa-rss"></i> {{Tester}}</a>'
}
tr += '<i class="fas fa-minus-circle pull-right cmdAction cursor" data-action="remove" title="{{Supprimer la commande}}"></i></td>'
tr += '</tr>'
$('#table_cmd tbody').append(tr)
var tr = $('#table_cmd tbody tr').last()
jeedom.eqLogic.buildSelectCmd({
id: $('.eqLogicAttr[data-l1key=id]').value(),
filter: {type: 'info'},
id: $('.eqLogicAttr[data-l1key=id]').value(),
filter: { type: 'info' },
error: function (error) {
$('#div_alert').showAlert({message: error.message, level: 'danger'})
$('#div_alert').showAlert({ message: error.message, level: 'danger' })
},
success: function (result) {
tr.find('.cmdAttr[data-l1key=value]').append(result)
Expand Down
10 changes: 5 additions & 5 deletions resources/demond/demond.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#
# Jeedom is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with Jeedom. If not, see <http://www.gnu.org/licenses/>.

Expand Down Expand Up @@ -43,7 +43,7 @@ def read_socket():
return
try:
print ('read')
except Exception, e:
except Exception as e:
logging.error('Send command to demon error : '+str(e))

def listen():
Expand Down Expand Up @@ -116,7 +116,7 @@ def shutdown():
_cycle = float(args.cycle)
if args.socketport:
_socketport = args.socketport

_socket_port = int(_socket_port)

jeedom_utils.set_log_level(_log_level)
Expand All @@ -130,7 +130,7 @@ def shutdown():
logging.info('Device : '+str(_device))

signal.signal(signal.SIGINT, handler)
signal.signal(signal.SIGTERM, handler)
signal.signal(signal.SIGTERM, handler)

try:
jeedom_utils.write_pid(str(_pidfile))
Expand Down

0 comments on commit 1e4afe3

Please sign in to comment.