equal
deleted
inserted
replaced
223 if parser.process(url, raise_on_error): |
223 if parser.process(url, raise_on_error): |
224 error = True |
224 error = True |
225 except IOError, exc: |
225 except IOError, exc: |
226 if raise_on_error: |
226 if raise_on_error: |
227 raise |
227 raise |
228 self.error('could not pull data while processing %s: %s', |
228 parser.import_log.record_error( |
229 url, exc) |
229 'could not pull data while processing %s: %s' |
|
230 % (url, exc)) |
230 error = True |
231 error = True |
231 except Exception, exc: |
232 except Exception, exc: |
232 if raise_on_error: |
233 if raise_on_error: |
233 raise |
234 raise |
234 self.exception('error while processing %s: %s', |
235 self.exception('error while processing %s: %s', |
318 sourceparams=sourceparams) |
319 sourceparams=sourceparams) |
319 except ValidationError, ex: |
320 except ValidationError, ex: |
320 # XXX use critical so they are seen during tests. Should consider |
321 # XXX use critical so they are seen during tests. Should consider |
321 # raise_on_error instead? |
322 # raise_on_error instead? |
322 self.source.critical('error while creating %s: %s', etype, ex) |
323 self.source.critical('error while creating %s: %s', etype, ex) |
|
324 self.import_log.record_error('error while creating %s: %s' |
|
325 % (etype, ex)) |
323 return None |
326 return None |
324 if eid < 0: |
327 if eid < 0: |
325 # entity has been moved away from its original source |
328 # entity has been moved away from its original source |
326 # |
329 # |
327 # Don't give etype to entity_from_eid so we get UnknownEid if the |
330 # Don't give etype to entity_from_eid so we get UnknownEid if the |
363 try: |
366 try: |
364 parsed = self.parse(url) |
367 parsed = self.parse(url) |
365 except Exception, ex: |
368 except Exception, ex: |
366 if raise_on_error: |
369 if raise_on_error: |
367 raise |
370 raise |
368 self.source.error(str(ex)) |
371 self.import_log.record_error(str(ex)) |
369 return True |
372 return True |
370 error = False |
373 error = False |
371 for args in parsed: |
374 for args in parsed: |
372 try: |
375 try: |
373 self.process_item(*args) |
376 self.process_item(*args) |