- tfile_list = [os.path.join(git.get_base_dir(), 'covermail.tmpl'),
- os.path.join(sys.prefix,
- 'share/stgit/templates/covermail.tmpl')]
-
- tmpl = None
- for tfile in tfile_list:
- if os.path.isfile(tfile):
- tmpl = file(tfile).read()
- break
- if not tmpl:
- raise CmdException, 'No cover message template file found'
+ tmpl = templates.get_template('covermail.tmpl')
+ if not tmpl:
+ raise CmdException, 'No cover message template file found'