X-Git-Url: https://git.tld-linux.org/?p=TLD.git;a=blobdiff_plain;f=pld-builder.new%2FPLD_Builder%2Fnotify.py;fp=pld-builder.new%2FPLD_Builder%2Fnotify.py;h=0000000000000000000000000000000000000000;hp=5b0368f8a064a29833c9e0575cde0cdc831a103b;hb=3dc53b6865f716904ad4d02e934e04b3d4855c32;hpb=b235722fd546915a60800f2660d76f684d6f1445 diff --git a/pld-builder.new/PLD_Builder/notify.py b/pld-builder.new/PLD_Builder/notify.py deleted file mode 100644 index 5b0368f..0000000 --- a/pld-builder.new/PLD_Builder/notify.py +++ /dev/null @@ -1,41 +0,0 @@ -# vi: encoding=utf-8 ts=8 sts=4 sw=4 et - -import StringIO - -import mailer -import gpg -import util -import notifyq -from config import config - -class Notifier: - def __init__(self, g): - self.xml = StringIO.StringIO() - self.xml.write("\n" % \ - (g.id, config.builder)) - - def send(self, r): - sio = StringIO.StringIO() - self.xml.write("\n") - self.xml.seek(0) - sio.write(gpg.sign(self.xml.read())) - self.xml = None - sio.seek(0) - notifyq.init(r) - notifyq.add(sio) - notifyq.flush() - - def add_batch(self, b, s): - self.xml.write(" \n" % (b.b_id, s)) - -n = None - -def begin(group): - global n - n = Notifier(group) - -def add_batch(batch, status): - n.add_batch(batch, status) - -def send(r): - n.send(r)