Projet

Général

Profil

Bug #29478

tenant_command vs exceptions non-ascii

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

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

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

            command.stderr.write('%s: %s: %s' % (
                connection.get_tenant(), e.__class__.__name__, e))

mais si comme face à une erreur d'un postgresql configuré en français ça contient des accents, crash.

  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):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 89: ordinal not in range(128)

Historique

#1

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

  • Statut changé de Nouveau à Fermé

A priori ok maintenant qu'on est en Python 3.

Formats disponibles : Atom PDF