from stgit.commands.common import *
from stgit.utils import *
-from stgit import stack, git
+from stgit import stack, git, basedir
from stgit.config import config
"""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
if options.cover:
tfile_list = [options.cover]
else:
- tfile_list = [os.path.join(git.get_base_dir(), 'covermail.tmpl'),
+ tfile_list = [os.path.join(basedir.get(), 'covermail.tmpl'),
os.path.join(sys.prefix,
'share/stgit/templates/covermail.tmpl')]
if options.template:
tfile_list = [options.template]
else:
- tfile_list = [os.path.join(git.get_base_dir(), 'patchmail.tmpl'),
+ tfile_list = [os.path.join(basedir.get(), 'patchmail.tmpl'),
os.path.join(sys.prefix,
'share/stgit/templates/patchmail.tmpl')]
tmpl = None