Projet

Général

Profil

Development #30559

tenant_command: decode exceptions output

Ajouté par Christophe Siraut il y a environ 5 ans. Mis à jour il y a plus de 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
12 février 2019
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Traceback (most recent call last):
  File "/usr/lib/passerelle/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/hobo/multitenant/management/commands/tenant_command.py", line 112, in run_from_argv
    error = run_command_from_argv(klass, args)
  File "/usr/lib/python2.7/dist-packages/hobo/multitenant/management/commands/tenant_command.py", line 47, in run_command_from_argv
    connection.get_tenant(), e.__class__.__name__, e))
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 111, in write
    if ending and not msg.endswith(ending):

Fichiers

Révisions associées

Révision 11c79a97 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 4 ans

tenant_command: convert exception to UTF-8 (#30559)

Historique

#1

Mis à jour par Christophe Siraut il y a environ 5 ans

#2

Mis à jour par Benjamin Dauvergne il y a environ 5 ans

  • Statut changé de Solution proposée à En cours
On ne sait pas trop ce que va retourner str(e), je serais pour une approche en trois temps:
  • unicode(e).encode('utf-8')
  • str(e).decode('utf-8', 'replace')
  • '<echec>'
#3

Mis à jour par Christophe Siraut il y a plus de 4 ans

  • Statut changé de En cours à Nouveau
  • Assigné à Christophe Siraut supprimé

Je laisse la main.

#4

Mis à jour par Benjamin Dauvergne il y a plus de 4 ans

  • Assigné à mis à Benjamin Dauvergne
#5

Mis à jour par Benjamin Dauvergne il y a plus de 4 ans

Je vais voir pour faire un test.

#6

Mis à jour par Benjamin Dauvergne il y a plus de 4 ans

Elle est vraiment tordue cette commande, c'est pas le même code quand on a un tenant ou plusieurs (pour exécuter la commande sous-jacente, dans un cas c'est run_command_from_argv(command, argv) et dans l'autre klass.run_from_argv().

#8

Mis à jour par Christophe Siraut il y a plus de 4 ans

  • Statut changé de Solution proposée à Solution validée
#9

Mis à jour par Frédéric Péters il y a plus de 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 11c79a9770e5d4b1ff4c7a7e949a0340a59b19d7
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Jul 9 17:32:11 2019 +0200

    tenant_command: convert exception to UTF-8 (#30559)
#10

Mis à jour par Frédéric Péters il y a plus de 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF