Project

General

Profile

Development #30559

tenant_command: decode exceptions output

Added by Christophe Siraut 10 months ago. Updated 5 months ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
12 Feb 2019
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

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):

0001-tenant_command-decode-exceptions-output-30559.patch View (1014 Bytes) Christophe Siraut, 12 Feb 2019 12:14 PM

0001-tenant_command-convert-exception-to-UTF-8-30559.patch View (2.28 KB) Benjamin Dauvergne, 09 Jul 2019 05:32 PM

0001-tenant_command-convert-exception-to-UTF-8-30559.patch View (7.35 KB) Benjamin Dauvergne, 09 Jul 2019 06:47 PM

Associated revisions

Revision 11c79a97 (diff)
Added by Benjamin Dauvergne 5 months ago

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

History

#1 Updated by Christophe Siraut 10 months ago

#2 Updated by Benjamin Dauvergne 9 months ago

  • Status changed from Solution proposée to 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 Updated by Christophe Siraut 5 months ago

  • Status changed from En cours to Nouveau
  • Assignee deleted (Christophe Siraut)

Je laisse la main.

#4 Updated by Benjamin Dauvergne 5 months ago

  • Assignee set to Benjamin Dauvergne

#5 Updated by Benjamin Dauvergne 5 months ago

Je vais voir pour faire un test.

#6 Updated by Benjamin Dauvergne 5 months ago

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 Updated by Christophe Siraut 5 months ago

  • Status changed from Solution proposée to Solution validée

#9 Updated by Frédéric Péters 5 months ago

  • Status changed from Solution validée to 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 Updated by Frédéric Péters 5 months ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF