#2284: BuildMaster instance has no attribute 'statusTargets'
---------------------+--------------------
Reporter:  stepchen  |       Owner:
    Type:  defect    |      Status:  new
Priority:  major     |   Milestone:  0.8.7
 Version:  0.8.6p1   |  Resolution:
Keywords:            |
---------------------+--------------------

Comment (by toto):

 For refrence:

 code snipet:
 --------------------------------------
 def _mail_missing_message(self, subject, text):
         # first, see if we have a MailNotifier we can use. This gives us a
         # fromaddr and a relayhost.
         buildmaster = self.botmaster.master
         for st in buildmaster.statusTargets:
             if isinstance(st, MailNotifier):
                 break
         else:
             # if not, they get a default MailNotifier, which always uses
 SMTP
             # to localhost and uses a dummy fromaddr of "buildbot".
             log.msg("buildslave-missing msg using default MailNotifier")
             st = MailNotifier("buildbot")
         # now construct the mail

         m = Message()
         m.set_payload(text)
         m['Date'] = formatdate(localtime=True)
         m['Subject'] = subject
         m['From'] = st.fromaddr
         recipients = self.notify_on_missing
         m['To'] = ", ".join(recipients)
         d = st.sendMessage(m, recipients)
         # return the Deferred for testing purposes
         return d

 
---------------------------------------------------------------------------------
 File "/usr/local/lib/python2.6/dist-
 packages/buildbot-0.8.6p1-py2.6.egg/buildbot/buildslave.py", line 606, in
 _mail_missing_message

 for st in buildmaster.statusTargets:

 exceptions.[http://www.events-i-aarhus.dk AttributeError?]:
 [http://www.events-i-aarhus.dk BuildMaster?]
 [http://www.events-i-aarhus.dk/c/teambuilding teambuilding] instance has
 no attribute 'statusTargets'

 This is the only occurrence of statusTargets in master's source. Changing
 the field to just 'status' seem to have worked around the problem

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2284#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to