From da44d3c7c9e5c105fca962fa2b6c248d7fd152ae Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 30 May 2018 14:29:00 -0300 Subject: [PATCH] =?UTF-8?q?Autodecodifica=20nomes=20de=20usu=C3=A1rios=20a?= =?UTF-8?q?o=20exportar=20zope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index 7507ffb87..a29a0b83b 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -17,12 +17,12 @@ from functools import partial import git import magic import yaml -import ZODB.DB -import ZODB.FileStorage from unipath import Path -from ZODB.broken import Broken +import ZODB.DB +import ZODB.FileStorage from variaveis_comuns import DIR_DADOS_MIGRACAO, TAG_ZOPE +from ZODB.broken import Broken EXTENSOES = { 'application/msword': '.doc', @@ -308,6 +308,8 @@ def dump_propriedades(docs, path, salvar): def dump_usuarios(sapl, path, salvar): users = br(br(sapl['acl_users'])['data']) users = {autodecode(k): br(v) for k, v in users['data'].items()} + for dados in users.values(): + dados['name'] = autodecode(dados['name']) save_as_yaml(path, 'usuarios.yaml', users, salvar)