Mercurial > hg > drupalISMI
comparison importFromOpenMind/importer/check_ismi_log.py @ 45:277ea02906f9
update for changes in log format.
author | casties |
---|---|
date | Fri, 09 Dec 2016 12:24:21 +0100 |
parents | 4dee9586cc44 |
children |
comparison
equal
deleted
inserted
replaced
44:4692e90215eb | 45:277ea02906f9 |
---|---|
304 deleting += 1 | 304 deleting += 1 |
305 log('DEBUG', line) | 305 log('DEBUG', line) |
306 deleteCtx = parseStart(line) | 306 deleteCtx = parseStart(line) |
307 | 307 |
308 if deleting > 1: | 308 if deleting > 1: |
309 log("ERROR", "Concurrent delete (%s) in #%s of %s"%(saving, linecnt, line)) | 309 log("ERROR", "Concurrent delete (%s) in #%s of %s"%(deleting, linecnt, line)) |
310 # TODO: what now? | 310 # TODO: what now? |
311 break | 311 break |
312 | 312 |
313 elif 'transactionlog' in line: | 313 elif 'transactionlog' in line: |
314 if '* START save previous' in line: | 314 if '* START save previous' in line: |
315 savingPrev += 1 | 315 savingPrev += 1 |
316 | 316 |
317 elif '* End ...save previous' in line: | 317 elif '* END ...save previous' in line or '* End ...save previous' in line: |
318 if deleting > 0 and savingPrev > 0: | 318 if deleting > 0 and savingPrev > 0: |
319 # this should be the end of the save prev from deleting | 319 # this should be the end of the save prev from deleting |
320 deleting -= 1 | 320 deleting -= 1 |
321 deleteCtx = None | 321 deleteCtx = None |
322 | 322 |
323 savingPrev -= 1 | 323 savingPrev -= 1 |
324 | 324 |
325 if saving < 0: | 325 if savingPrev < 0: |
326 log("ERROR", "Too many END save previous!") | 326 log("ERROR", "Too many END save previous!") |
327 | 327 |
328 elif 'save previous' in line: | 328 elif 'save previous' in line: |
329 data = parseSave(line) | 329 data = parseSave(line) |
330 if data is None: | 330 if data is None: |