Bug #41132
Commande hobo_notify utilisant un fichier HS en python3
Début:
28 mars 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Bug constaté en rejouant manuellement la notification des rôles via hobo-agent :
$ /usr/bin/wcsctl -f /etc/wcs/wcs.cfg hobo_notify /tmp/notify.json File "/usr/lib/python3/dist-packages/wcs/ctl/hobo_notify.py", line 64, in load_notification return json.load(file(args[0])) NameError: name 'file' is not defined
Fichiers
Révisions associées
Historique
Mis à jour par Thomas Noël il y a environ 4 ans
- Sujet changé de Comande hobo_notify utilisant un fichier HS en python3 à Commande hobo_notify utilisant un fichier HS en python3
(mignon, good catch... note qu'on l'avait jamais vu parce que Publik passe toujours par stdin)
Mis à jour par Nicolas Roche il y a environ 4 ans
- Fichier 0001-python3-replace-file-function-by-open-41132.patch 0001-python3-replace-file-function-by-open-41132.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
J'ai également corrigé les autres occurrences de la fonction file
trouvées :
$ git grep '[ (]file(' tests/robot/WcsRobotFrameworkLibrary.py: fd = file('/tmp/.tests/pid', 'w') tests/robot/WcsRobotFrameworkLibrary.py: fd = file('/tmp/.tests/pid') wcs/qommon/static/images/categories/generate.py: tree = ET.fromstring(file(svg_path).read().replace('#000000', '#%s' % options.colour)) wcs/qommon/static/images/categories/generate.py: tree = ET.fromstring(file(svg_path).read())
Mis à jour par Thomas Noël il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
Poussée, nickel.
commit d20db7a3f7db48279c9eb6bc007fdb6b1ee9e894 Author: Nicolas ROCHE <nroche@entrouvert.com> Date: Sat Mar 28 20:50:48 2020 +0100 python3: replace file function by open (#41132)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
python3: replace file function by open (#41132)