aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2011-03-15 20:04:20 +0100
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2011-03-15 20:04:20 +0100
commit2727dbf78d895885016dac52dff7fdc271a77d8f (patch)
treeaa288d2cbc18812fbe0b3205e8a307e260a07d8f
parente3f7e05c274113265b1b780cf6e4a5215f08bc1a (diff)
Split a couple of lines to make the code more readable
-rwxr-xr-xyoutube-dl8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube-dl b/youtube-dl
index cbfbdca9c..b2cd5e87f 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -2620,8 +2620,8 @@ class FFmpegExtractAudioPP(PostProcessor):
@staticmethod
def get_audio_codec(path):
try:
- handle = subprocess.Popen(['ffprobe', '-show_streams', '--', path],
- stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE)
+ cmd = ['ffprobe', '-show_streams', '--', path]
+ handle = subprocess.Popen(cmd, stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE)
output = handle.communicate()[0]
if handle.wait() != 0:
return None
@@ -2638,8 +2638,8 @@ class FFmpegExtractAudioPP(PostProcessor):
@staticmethod
def run_ffmpeg(path, out_path, codec, more_opts):
try:
- ret = subprocess.call(['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + ['--', out_path],
- stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT)
+ cmd = ['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + ['--', out_path]
+ ret = subprocess.call(cmd, stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT)
return (ret == 0)
except (IOError, OSError):
return False