chiark / gitweb /
Remove the checking for the default configuration values
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 28 Mar 2006 21:01:02 +0000 (22:01 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 28 Mar 2006 21:01:02 +0000 (22:01 +0100)
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 <catalin.marinas@gmail.com>
stgit/commands/mail.py
stgit/commands/refresh.py

index 2fb88bc5ab7c42f365a0aaca8585a2b3dae90cee..633e0d2145483f687b29b76dcae35aeb56427828 100644 (file)
@@ -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
index 20b754636b5d6a894e683ab2f45264a1d57af5ac..c5f390fbfd4fee3bd26e190539b0436ea53a7f8a 100644 (file)
@@ -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()