From f5248c4f5ad422204e2706d5caac04f408e65fc3 Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 17 Jul 2012 18:56:47 +0200 Subject: [PATCH] add organization to output_dir --- telecaster/models.py | 10 +++++----- telecaster/tools/acpi.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/telecaster/models.py b/telecaster/models.py index 481ef30..c3ffcbb 100644 --- a/telecaster/models.py +++ b/telecaster/models.py @@ -133,7 +133,7 @@ class Station(Model): self.osc.add(osc[0]) else: self.osc.create(host='127.0.0.1', port=port) - + def deefuzzer_setup(self): self.output_dirs = [] self.urls = [] @@ -142,7 +142,7 @@ class Station(Model): output_dir = station['record']['dir'] if output_dir[-1] != os.sep: output_dir += os.sep - output_dir += os.sep.join([self.date, self.department, + output_dir += os.sep.join([self.date, self.organization, self.department, self.course.code + spacer + self.conference.course_type.name, self.public_id ]) @@ -152,7 +152,7 @@ class Station(Model): station['infos']['short_name'] = self.mount_point station['infos']['name'] = self.slug station['infos']['description'] = self.slug - + station['relay']['author'] = unicode(self.conference.professor.user.username) self.deefuzzer_user_file = self.user_dir + os.sep + 'station_' + \ station['media']['format'] + '.xml' @@ -210,10 +210,10 @@ class Station(Model): #tag = tags.__dict__['COMMENT'] #audio.add(COM(encoding=3, text=self.comment)) audio.save() - + def get_snapshot(self): pass - + def start(self): self.started = True self.deefuzzer_setup() diff --git a/telecaster/tools/acpi.py b/telecaster/tools/acpi.py index a4835d5..e6237ef 100644 --- a/telecaster/tools/acpi.py +++ b/telecaster/tools/acpi.py @@ -275,10 +275,10 @@ class AcpiLinux: except ValueError: self.life_capacity[i] = 0 -# it's possible that in battery/*/info the charging state is unknown -# --> then we must check ac_state... -# iterating over all batteries this way is not smart. better implementation needed -# better are funcs for capacity, acstate and prrate + # it's possible that in battery/*/info the charging state is unknown + # --> then we must check ac_state... + # iterating over all batteries this way is not smart. better implementation needed + # better are funcs for capacity, acstate and prrate # a little bit tricky... if loading of ac driver fails, we cant use info # from /proc/ac_*/... -- 2.39.5