From: Antonio Ospite <ospite@studenti.unina.it> Date: Sat, 19 Oct 2013 10:20:22 +0000 (+0200) Subject: Simplify get_manifest() signature X-Git-Url: https://git.ao2.it/smooth-dl.git/commitdiff_plain/64956443214ffb5ba10b4079a71954a2f6b23995 Simplify get_manifest() signature The manifest_file argument is never used, downloading to 'Manifest' is just fine. --- diff --git a/smooth-dl.py b/smooth-dl.py index 16ee966..91b4ec2 100755 --- a/smooth-dl.py +++ b/smooth-dl.py @@ -92,8 +92,7 @@ def write_wav_header(out_file, fmt, codec_private_data, data_len): out_file.write(struct.pack('<L', data_len)) -def get_manifest(base_url, dest_dir=tempfile.gettempdir(), - manifest_file='Manifest'): +def get_manifest(base_url, dest_dir=tempfile.gettempdir()): """Returns the manifest and the new URL if this is changed""" if os.path.exists(dest_dir) == False: @@ -108,7 +107,7 @@ def get_manifest(base_url, dest_dir=tempfile.gettempdir(), response = urllib2.urlopen(manifest_url) data = response.read() - manifest_path = os.path.join(dest_dir, manifest_file) + manifest_path = os.path.join(dest_dir, 'Manifest') f = open(manifest_path, "w") f.write(data) f.close()