diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-02-02 20:33:23 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-02-02 20:33:25 +0100 |
commit | cc9ca3ba6e0ba24b318ef191fdf84927e773008d (patch) | |
tree | b2c93bf3dfcbcb918498d6172b52ba4ec791469a /youtube_dl | |
parent | ea71034bd3965de8ff7239516776296e2c9857c3 (diff) |
[downloader/external] Simplify source_address
'' might actually be passed in, so check for None.
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/downloader/external.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index faac11805..ff031d2e0 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -46,11 +46,10 @@ class ExternalFD(FileDownloader): return info_dict['protocol'] in ('http', 'https', 'ftp', 'ftps') def _source_address(self, command_option): - command_part = [] source_address = self.params.get('source_address') - if source_address: - command_part = [command_option, source_address] - return command_part + if source_address is None: + return [] + return [command_option, source_address] def _call_downloader(self, tmpfilename, info_dict): """ Either overwrite this or implement _make_cmd """ |