From 4239c56e93b0e6cc7513a598812ff200d0becab8 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sat, 18 Apr 2009 17:13:28 +0100 Subject: [PATCH] fix variable name and send email before removing transition Signed-off-by: Mark Hymers --- dak/transitions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dak/transitions.py b/dak/transitions.py index 4080f3e6..4327f5b2 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -457,14 +457,11 @@ def check_transitions(transitions): subst['__TRANSITION_MESSAGE__'] += info[remove] + '\n' del transitions[remove] - edit_file = temp_transitions_file(transitions) - write_transitions_from_file(edit_file) - # If we have a mail address configured for transitions, # send a notification subst['__TRANSITION_EMAIL__'] = Cnf.get("Transitions::Notifications", "") if subst['__TRANSITION_EMAIL__'] != "": - print "Sending notification to %s" % subst['__TRANSITION__EMAIL__'] + print "Sending notification to %s" % subst['__TRANSITION_EMAIL__'] subst['__DAK_ADDRESS__'] = Cnf["Dinstall::MyEmailAddress"] subst['__BCC__'] = 'X-DAK: dak transitions' if Cnf.has_key("Dinstall::Bcc"): @@ -473,6 +470,9 @@ def check_transitions(transitions): os.path.join(Cnf["Dir::Templates"], 'transition.removed')) utils.send_mail(message) + edit_file = temp_transitions_file(transitions) + write_transitions_from_file(edit_file) + print "Done" else: print "WTF are you typing?" -- 2.39.5