Project

General

Profile

Bug #29478

tenant_command vs exceptions non-ascii

Added by Frédéric Péters 9 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07 Jan 2019
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

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)

Also available in: Atom PDF