From 79ef25ac491bb8c6aa4510cce00f09f06b8bfdd2 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 24 Mar 2008 09:51:39 +0000 Subject: [PATCH] Refuse to send empty patches Signed-off-by: Catalin Marinas --- stgit/commands/mail.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index eea84f2..f256725 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -517,6 +517,12 @@ def func(parser, options, args): else: raise CmdException, 'Incorrect options. Unknown patches to send' + out.start('Checking the validity of the patches') + for p in patches: + if crt_series.empty_patch(p): + raise CmdException, 'Cannot send empty patch "%s"' % p + out.done() + smtppassword = options.smtp_password or config.get('stgit.smtppassword') smtpuser = options.smtp_user or config.get('stgit.smtpuser') smtpusetls = options.smtp_tls or config.get('stgit.smtptls') == 'yes' -- 2.11.0