~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archiveuploader/nascentupload.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-06 07:15:43 UTC
  • mfrom: (14634.1.6 bug-876594)
  • Revision ID: launchpad@pqm.canonical.com-20120106071543-ym23hw45nfuskgre
[r=jcsackett][bug=876594] Don't notify upstream authors of build
 failures of synced sources.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2012 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""The processing of nascent uploads.
909
909
            # state.
910
910
            pass
911
911
 
912
 
        changes_file_object = open(self.changes.filepath, "r")
913
 
        self.queue_root.notify(summary_text=self.rejection_message,
914
 
            changes_file_object=changes_file_object, logger=self.logger)
915
 
        changes_file_object.close()
 
912
        with open(self.changes.filepath, "r") as changes_file_object:
 
913
            self.queue_root.notify(
 
914
                summary_text=self.rejection_message,
 
915
                changes_file_object=changes_file_object, logger=self.logger)
916
916
 
917
917
    def _createQueueEntry(self):
918
918
        """Return a PackageUpload object."""