Opened 5 years ago

Last modified 5 years ago

#1811 closed defect

logprocessor crashes if unable to process one log file — at Initial Version

Reported by: trev Assignee:
Priority: P1 Milestone:
Module: Infrastructure Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: no Confidential: no
Tester: Verified working:
Review URL(s):



logprocessor parses a number of log files. If processing one of the log files fails it is supposed to report the error and continue. However, that's not what currently happens, instead the following error occurs and crashes the entire process:

Traceback (most recent call last):
  File "", line 51, in run_toplevel
  File "/usr/lib/pypy/lib-python/2.7/", line 164, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/pypy/lib-python/2.7/", line 73, in _run_code
    exec code in run_globals
  File "/opt/sitescripts/sitescripts/stats/bin/", line 556, in <module>
    parse_sources(sources, args.factor, args.verbose)
  File "/opt/sitescripts/sitescripts/stats/bin/", line 533, in parse_sources
    for log_file, ignored in pool.imap_unordered(callback, sources, chunksize=1):
ValueError: expected length 2, got 4

What to change

Adjust number of returned values in case of error to be the same as in the normal scenario.

Change History (0)

Note: See TracTickets for help on using tickets.