From: yomguy Date: Thu, 19 Jul 2012 11:41:43 +0000 (+0200) Subject: fix osc value X-Git-Tag: 0.9~53 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0819ce452a8ebb39e217f8d7beef655af07163cd;p=telecaster-client.git fix osc value --- diff --git a/telecaster/models.py b/telecaster/models.py index d583cab..3cd14ec 100644 --- a/telecaster/models.py +++ b/telecaster/models.py @@ -126,14 +126,13 @@ class Station(Model): self.save() for station in self.conf['deefuzzer']['station']: - if station['control']['mode']: - if int(station['control']['mode']): - port = int(station['control']['port']) - osc = OSC.objects.filter(port=port) - if osc: - self.osc.add(osc[0]) - else: - self.osc.create(host='localhost', port=port) + if station['control']['mode'] != '0': + port = int(station['control']['port']) + osc = OSC.objects.filter(port=port) + if osc: + self.osc.add(osc[0]) + else: + self.osc.create(host='localhost', port=port) def deefuzzer_setup(self): self.output_dirs = []