Browse Source

Ignora aquivos vazios ao exportar docs

pull/1916/head
Marcio Mazza 7 years ago
parent
commit
8997c91dfc
  1. 9
      sapl/legacy/scripts/exporta_zope/exporta_zope.py

9
sapl/legacy/scripts/exporta_zope/exporta_zope.py

@ -18,10 +18,9 @@ import git
import magic
import pyaml
import yaml
from unipath import Path
import ZODB.DB
import ZODB.FileStorage
from unipath import Path
from ZODB.broken import Broken
EXTENSOES = {
@ -107,7 +106,11 @@ def dump_file(doc, path, salvar):
while pdata:
output.write(pdata.pop('data'))
pdata = br(pdata.pop('next', None))
salvar(fullname, output.getvalue())
conteudo = output.getvalue()
if conteudo:
# pula arquivos vazios
salvar(fullname, conteudo)
return name

Loading…
Cancel
Save