From: martin f. krafft Date: Sun, 30 Sep 2007 16:33:33 +0000 (+0100) Subject: use default if not template name specified X-Git-Tag: mailplate-0.1~9 X-Git-Url: https://git.madduck.net/code/mailplate.git/commitdiff_plain/e25523802d9c24ab7110037056f87e0a1c88c116 use default if not template name specified --- diff --git a/mailplate b/mailplate index 439fc73..2b0789d 100755 --- a/mailplate +++ b/mailplate @@ -325,8 +325,11 @@ elif (options.auto or options.menu) and templname: sys.exit(posix.EX_USAGE) elif not templname and not (options.auto or options.menu): - err('no template specified') - sys.exit(posix.EX_USAGE) + if default_templname is not None: + templname = default_templname + else: + err('no template specified') + sys.exit(posix.EX_USAGE) elif options.menu: err('--menu mode not yet implemented')