Skip to content

Commit

Permalink
Fixing URLGetter.download_to_file() Python 2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcspadden committed Nov 27, 2019
1 parent 2fac695 commit c31789f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/autopkglib/URLGetter.py
Expand Up @@ -206,10 +206,10 @@ def download_to_file(self, url, filename, headers=None):
self.add_curl_headers(curl_cmd, headers)
curl_cmd.append(url)
curl_cmd.extend(["-o", filename])
self.download_with_curl(curl_cmd, text=False)
self.download_with_curl(curl_cmd)
if os.path.exists(filename):
return filename
raise ProcessorError(f"{filename} was not written!")
raise ProcessorError("{} was not written!".format(filename))

def main(self):
pass
Expand Down

0 comments on commit c31789f

Please sign in to comment.