~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/adapters/copypolicy.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-08 19:16:41 UTC
  • mfrom: (13168.3.1 ppa-policies-fix)
  • Revision ID: launchpad@pqm.canonical.com-20110608191641-ha7gl0dutfl1wgqf
[r=julian-edwards][no-qa] Fix the copy policies so that PPA copies
        don't send email.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 
61
61
    enum_value = PackageCopyPolicy.INSECURE
62
62
 
63
 
    send_email = True
 
63
    def send_email(self, archive):
 
64
        if archive.is_ppa:
 
65
            return False
 
66
            
 
67
        return True
64
68
 
65
69
 
66
70
class MassSyncCopyPolicy(BasicCopyPolicy):
69
73
 
70
74
    enum_value = PackageCopyPolicy.MASS_SYNC
71
75
 
72
 
    send_email = False
 
76
    def send_email(self, archive=None):
 
77
        return False
73
78
 
74
79
 
75
80
policies = [