pld-builder.new: PLD_Builder/request_handler.py Fail the whole scr...
arekm
arekm at pld-linux.org
Sat Feb 10 18:16:49 CET 2007
Author: arekm Date: Sat Feb 10 17:16:48 2007 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
Fail the whole script if request was not processed (so request email will stay in MTA queue).
---- Files affected:
pld-builder.new/PLD_Builder:
request_handler.py (1.35 -> 1.36)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/request_handler.py
diff -u pld-builder.new/PLD_Builder/request_handler.py:1.35 pld-builder.new/PLD_Builder/request_handler.py:1.36
--- pld-builder.new/PLD_Builder/request_handler.py:1.35 Sat Feb 26 15:00:16 2005
+++ pld-builder.new/PLD_Builder/request_handler.py Sat Feb 10 18:16:43 2007
@@ -142,7 +142,7 @@
if user == None:
# FIXME: security email here
log.alert("invalid signature, or not in acl %s" % em)
- return
+ return False
acl.set_current_user(user)
status.push("email from %s" % user.login)
r = request.parse_request(body)
@@ -159,13 +159,14 @@
m.write_line(msg)
m.send()
status.pop()
+ return True
def main():
init_conf("src")
status.push("handling email request")
- handle_request(sys.stdin)
+ ret = handle_request(sys.stdin)
status.pop()
- sys.exit(0)
+ sys.exit(not ret)
if __name__ == '__main__':
wrap.wrap(main)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/pld-builder.new/PLD_Builder/request_handler.py?r1=1.35&r2=1.36&f=u
More information about the pld-cvs-commit
mailing list