From: Catalin Marinas Date: Tue, 28 Mar 2006 21:01:02 +0000 (+0100) Subject: Remove the checking for the default configuration values X-Git-Tag: v0.14.3~519 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/b517494ffb555c80cff724f0f4575821d899fe4b Remove the checking for the default configuration values Since some options are set as defaults in stgit/config.py, there is no need to check for their presence with config.has_option(). Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index 2fb88bc..633e0d2 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -344,8 +344,6 @@ def func(parser, options, args): """Send the patches by e-mail using the patchmail.tmpl file as a template """ - if not config.has_option('stgit', 'smtpserver'): - raise CmdException, 'smtpserver not defined' smtpserver = config.get('stgit', 'smtpserver') smtpuser = None diff --git a/stgit/commands/refresh.py b/stgit/commands/refresh.py index 20b7546..c5f390f 100644 --- a/stgit/commands/refresh.py +++ b/stgit/commands/refresh.py @@ -66,10 +66,7 @@ options = [make_option('-f', '--force', def func(parser, options, args): - if config.has_option('stgit', 'autoresolved'): - autoresolved = config.get('stgit', 'autoresolved') - else: - autoresolved = 'no' + autoresolved = config.get('stgit', 'autoresolved') if autoresolved != 'yes': check_conflicts()