From e25523802d9c24ab7110037056f87e0a1c88c116 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 30 Sep 2007 17:33:33 +0100 Subject: [PATCH] use default if not template name specified --- mailplate | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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') -- 2.39.5