]>
gitweb.michael.orlitzky.com - dead/pictar.git/blob - Mime/SupportedType.py
3 Wrapper class for the 'filetype' elements in the config
4 file. Nothing tricky here, except that the accessor for the
5 template should intelligently determine which of the two fields
6 (template_file, template_data) is used as the template source.
17 self
.description
= description
18 self
.extensions
= extensions
19 self
.template_file
= template_file
20 self
.template_data
= template_data
25 def GetTemplate(self
):
26 if (self
.template_data
== None or self
.template_data
== ''):
27 # The data is not given explicitly, so rely on the
28 # template file to provide it.
29 template_file
= open(self
.template_file
, 'r')
30 template
= template_file
.read()
34 return self
.template_data