filter_section_warning.py 369 B

1234567891011121314
  1. #!/usr/bin/python
  2. #
  3. import sys
  4. for line in sys.stdin:
  5. # If line is a 'noisy' warning, don't print it or the following two lines.
  6. if ('warning: section' in line and 'is deprecated' in line
  7. or 'note: change section name to' in line):
  8. next(sys.stdin)
  9. next(sys.stdin)
  10. else:
  11. sys.stdout.write(line)
  12. sys.stdout.flush()