X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=37b542dad0489012563d115613002039ff21ffe6;hb=2f2cc6977f137b0581c83aceb881dd667fee47f7;hp=e745e1eb6a87b9096e4816ae8dd4e40446630810;hpb=52c975f4837d547f41bb364077d72e7a19c02aa3;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index e745e1eb..37b542da 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -44,7 +44,8 @@ from dak_exceptions import * from textutils import fix_maintainer from regexes import re_html_escaping, html_escaping, re_single_line_field, \ re_multi_line_field, re_srchasver, re_taint_free, \ - re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource + re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource, \ + re_is_orig_source from formats import parse_format, validate_changes_format from srcformats import get_format_from_string @@ -572,6 +573,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()