From 78bf262f41c6ea574a39cc8d506c8c264bfb6203 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Mon, 25 Jun 2018 10:35:06 -0300 Subject: [PATCH] Resiste a POSKeyError em mais um ponto --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index c2b8e7973..51be333af 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -219,7 +219,11 @@ def dump_folder(folder, path, salvar, mtimes, enum=enumerate_folder): nao_identificados[meta_type].append(path + '/' + id) elif dump: if isinstance(dump, partial) and dump.func == dump_folder: - dump(br(obj), path, salvar, mtimes) + try: + dump(br(obj), path, salvar, mtimes) + except POSKeyError as e: + print_msg_poskeyerror(id) + continue else: # se o objeto for mais recente que o da última exportação mtime = obj._p_mtime