Skip to content

Commit

Permalink
Merge pull request #11 from PabloCastellano/registro_none
Browse files Browse the repository at this point in the history
Registro none
  • Loading branch information
PabloCastellano committed Mar 11, 2017
2 parents 0585850 + 6ebd78b commit 36b50a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bormeparser/backends/pypdf2/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ def __init__(self, filename, log_level=logging.WARN):
self.sanitize = OPTIONS['SANITIZE_COMPANY_NAME']

def _parse(self):
anuncio_id = None
cabecera = False
changing_page = False
cve = False
data = ""
empresa = None
registro = None
fecha = False
last_font = 0
nombreacto = None
Expand Down Expand Up @@ -102,7 +99,6 @@ def _parse(self):
'Registro': registro,
'Actos': self.actos
}
registro = None

data = ""
self.actos = []
Expand Down Expand Up @@ -162,6 +158,8 @@ def _parse(self):
cabecera = False
data = self._clean_data(data)
anuncio_id, empresa, registro = regex_empresa(data, sanitize=self.sanitize)
if registro is None:
registro = ""
logger.debug(' anuncio_id: %s' % anuncio_id)
logger.debug(' empresa: %s' % empresa)
logger.debug(' registro: %s' % registro)
Expand Down

0 comments on commit 36b50a1

Please sign in to comment.