]> git.parisson.com Git - telecaster-server.git/commitdiff
Fix wrong exit()
authoryomguy <>
Fri, 25 Jul 2008 07:35:14 +0000 (07:35 +0000)
committeryomguy <>
Fri, 25 Jul 2008 07:35:14 +0000 (07:35 +0000)
telecaster.py

index 366d5b01e947de150185f5f97dab660de2149ebc..3e4f3797974642a9b07bd82ca070ea2ed04041a3 100755 (executable)
@@ -59,7 +59,8 @@ class Station(Conference):
     def __init__(self, conf_file, conference_dict, lock_file):
         Conference.__init__(self, conference_dict)
         self.date = datetime.datetime.now().strftime("%Y")
-        self.time = datetime.datetime.now().strftime("%x-%X").replace('/','_')
+        self.time = datetime.datetime.now().strftime("%x-%X")
+        self.time = self.time.replace('/','_')
         self.conf = xml2dict(conf_file)
         self.conf = self.conf['telecaster']
         self.root_dir = self.conf['server']['root_dir']
@@ -224,8 +225,7 @@ class Station(Conference):
         args = get_args(options)
         ext = get_file_extension()
         args = ' '.join(args)
-        command = 'sox "%s" -q -w -r 44100 -t wav -c2 - | lame %s -' \
-                       % (source, args)
+        command = 'sox "%s" -q -w -r 44100 -t wav -c2 - | lame %s -' % (source, args)
         # Processing (streaming + cache writing)
         stream = self.core_process(self.command,self.buffer_size,self.dest)
         for chunk in stream:
@@ -494,7 +494,6 @@ class TeleCaster:
             if get_pid('streamripper ', self.uid) == []:
                 writing = False
             w.stop_form(self.conference_dict, writing, casting)
-            exit()
             
         elif odd_pid != [] and os.path.exists(self.lock_file) and not form.has_key("action"):
             self.conference_dict = get_conference_from_lock(self.lock_file)
@@ -503,7 +502,6 @@ class TeleCaster:
             if get_pid('streamripper ', self.uid) == []:
                 writing = False
             w.stop_form(self.conference_dict, writing, casting)
-            exit()
 
         elif odd_pid != [] and form.has_key("action") and form["action"].value == "stop":
             if os.path.exists(self.lock_file):
@@ -511,11 +509,9 @@ class TeleCaster:
             s = Station(self.conf_file, self.conference_dict, self.lock_file)
             s.stop()
             w.start_form()
-            exit()
 
         elif odd_pid == []:
             w.start_form()
-            exit()
 
 
 # Call main function.