add .fns files to work around missing ACL support and missing gettext on macos 10.6
[build-farm.git] / mail-dead-hosts.py
index ceebef2e4d35ee619776ea7792ff145a6e39a0be..fada47eebf3ad0eaad65d71c793e37c6ae37e656 100755 (executable)
@@ -17,7 +17,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from buildfarm.sqldb import StormCachingBuildFarm
+from buildfarm import BuildFarm
+from buildfarm.web import host_uri
 import optparse
 import smtplib
 from email.MIMEText import MIMEText
@@ -27,7 +28,7 @@ parser = optparse.OptionParser()
 parser.add_option("--dry-run", help="Don't actually send any emails.", action="store_true")
 (opts, args) = parser.parse_args()
 
-buildfarm = StormCachingBuildFarm(timeout=40.0)
+buildfarm = BuildFarm(timeout=40.0)
 
 smtp = smtplib.SMTP()
 smtp.connect()
@@ -52,14 +53,13 @@ why we have not heard from your host?
 If you no longer wish your host to participate in the Samba Build
 Farm, then please let us know so we can remove its records.
 
-You can see the summary for your host at:
-http://build.samba.org/?function=View+Host;host=%s
+You can see the summary for your host at: %s
 
 Thanks,
 
 The Build Farm administration team.
 
-""" % (host.name, last_update, host.name)
+""" % (host.name, last_update, host_uri("http://build.samba.org/build.cgi", host.name))
 
     msg = MIMEText(body)