~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/devscripts/ec2test/remote.py

  • Committer: Jonathan Lange
  • Date: 2010-08-17 14:42:03 UTC
  • mto: This revision was merged to the branch mainline in revision 11390.
  • Revision ID: jml@canonical.com-20100817144203-2y7bu2yldkihun05
Make the tests for Logger use a public API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
489
489
        self._summary_file.close()
490
490
        self._index_file.close()
491
491
 
 
492
    def get_full_log_contents(self):
 
493
        """Return the contents of the complete log."""
 
494
        return self._get_contents(self._out_file)
 
495
 
 
496
    def get_summary_contents(self):
 
497
        """Return the contents of the summary log."""
 
498
        return self._get_contents(self._summary_file)
 
499
 
492
500
    def get_summary_stream(self):
493
501
        """Return a stream that, when written to, writes to the summary."""
494
502
        return self._summary_file
515
523
        if self._request.wants_email:
516
524
            self._summary_file.write(
517
525
                '\n(See the attached file for the complete log)\n')
518
 
            summary = self._get_contents(self._summary_file)
519
 
            full_log_gz = self._get_contents(self._out_file)
 
526
            summary = self.get_summary_contents()
 
527
            full_log_gz = self.get_full_log_contents()
520
528
            self._request.send_report_email(successful, summary, full_log_gz)
521
529
        self._close_logs()
522
530