from teleforma.models import Conference
+from deefuzzer.tools.utils import get_conf_dict, write_conf
+
from tools import *
self.department = self.course.department.name
self.organization = self.course.department.organization.name
- self.conf = xml2dict(conf_file)
+ self.conf = get_conf_dict(conf_file)
self.date = datetime.datetime.now().strftime("%Y")
self.time = datetime.datetime.now().strftime("%x-%X")
self.time_txt = self.time.replace('/','_').replace(':','_').replace(' ','_')
#FIXME: only one format in deefuzzer conf file
self.format = station['media']['format']
self.deefuzzer_file = 'cache' + os.sep + 'station_' + \
- station['media']['format'] + '.xml'
+ station['media']['format'] + '.yaml'
self.save()
- self.deefuzzer_xml = dicttoxml(self.conf)
def deefuzzer_write_conf(self):
- conf_file = open(self.deefuzzer_file.path,'w')
- conf_file.write(self.deefuzzer_xml)
- conf_file.close()
+ write_conf(self.conf, self.deefuzzer_file)
def deefuzzer_start(self):
command = '/usr/local/bin/deefuzzer ' + self.deefuzzer_file.path + ' &'