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

Loading…
Cancel
Save