home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / apport / apport-checkreports next >
Encoding:
Text File  |  2006-08-25  |  683 b   |  23 lines

  1. #!/usr/bin/python
  2.  
  3. # Check if there are new reports for the invoking user. Exit with 0 if new
  4. # reports are available, or with 1 if not.
  5. #
  6. # Copyright (c) 2006 Canonical Ltd.
  7. # Author: Martin Pitt <martin.pitt@ubuntu.com>
  8. #
  9. # This program is free software; you can redistribute it and/or modify it
  10. # under the terms of the GNU General Public License as published by the
  11. # Free Software Foundation; either version 2 of the License, or (at your
  12. # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
  13. # the full text of the license.
  14.  
  15. import sys, os.path
  16.  
  17. from apport_utils import get_new_reports
  18.  
  19. if len(get_new_reports()) > 0:
  20.     sys.exit(0)
  21. else:
  22.     sys.exit(1)
  23.