]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
Add a few docstrings. If someone could complete that, it would be great
[dak.git] / daklib / utils.py
index e745e1eb6a87b9096e4816ae8dd4e40446630810..9c008b19e7305b7ada50b538de36644187aa2f34 100644 (file)
@@ -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()