]> git.parisson.com Git - telemeta.git/commitdiff
fix wrong character encoding in core export commands
authoryomguy <>
Wed, 15 Apr 2009 16:53:16 +0000 (16:53 +0000)
committeryomguy <>
Wed, 15 Apr 2009 16:53:16 +0000 (16:53 +0000)
telemeta/export/core.py
telemeta/export/mp3.py

index a4d11e39dff64c2104eded40e746ec0f6948bbca..dc1cb018f86f2ef879250686131a11bc442e285c 100644 (file)
@@ -159,19 +159,16 @@ class ExporterCore(Component):
 
     def core_process(self, command, buffer_size, dest):
         """Encode and stream audio data through a generator"""
-        
+
         __chunk = 0
         file_out = open(dest,'w')
 
-        try:
-            proc = subprocess.Popen(command,
+        proc = subprocess.Popen(command.encode('utf-8'),
                     shell = True,
                     bufsize = buffer_size,
                     stdin = subprocess.PIPE,
                     stdout = subprocess.PIPE,
                     close_fds = True)
-        except:
-            raise ExportProcessError('Command failure:', command, proc)
 
         # Core processing
         while True:
index 6225e43255994fe0ddc1e21f3472d26915ce90de..f76a60583a6f0d31ee754fd8cb4388e0b1a56207 100644 (file)
@@ -135,9 +135,9 @@ class Mp3Exporter(ExporterCore):
         self.args = self.get_args(options)
         self.ext = self.get_file_extension()
         self.args = ' '.join(self.args)
-        self.command = 'sox "%s" -s -q -b 16 -r 44100 -t wav -c2 - | lame %s -' % (self.source, self.args)
+        self.command = 'sox "%s" -q -b 16 -r 44100 -t wav - | lame %s -' % (self.source, self.args)
         #self.command = 'lame %s "%s" -' % (self.args, self.source)
-        
+
         # Pre-proccessing
         self.dest = self.pre_process(self.item_id,
                                          self.source,