X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=9c008b19e7305b7ada50b538de36644187aa2f34;hb=64e27826913d0bdf1700a9e025773899e12f3500;hp=e745e1eb6a87b9096e4816ae8dd4e40446630810;hpb=52c975f4837d547f41bb364077d72e7a19c02aa3;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index e745e1eb..9c008b19 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -572,6 +572,10 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"): def send_mail (message, filename=""): """sendmail wrapper, takes _either_ a message string or a file as arguments""" + # Check whether we're supposed to be sending mail + if Cnf.has_key("Dinstall::Options::No-Mail") and Cnf["Dinstall::Options::No-Mail"]: + return + # If we've been passed a string dump it into a temporary file if message: (fd, filename) = tempfile.mkstemp()