Skip to content

Commit

Permalink
Update downloader.py from pymodules
Browse files Browse the repository at this point in the history
  • Loading branch information
corpnewt committed Mar 26, 2019
1 parent 79f34a6 commit 8ed78c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Scripts/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def open_url(self, url, headers = None):
# Py2 and a Cert verify error - let's set the unverified context
context = ssl._create_unverified_context()
try:
response = urlopen(Request(url, headers=headers), context=context)
response = urlopen(Request(url, headers=headers))
except:
# No fixing this - bail
return None
Expand Down Expand Up @@ -70,6 +70,7 @@ def _progress_hook(self, response, bytes_so_far, total_size):
b_s = self.get_size(bytes_so_far)
sys.stdout.write("Downloaded {} of {} ({:.2f}%)\r".format(b_s, t_s, percent))
else:
b_s = self.get_size(bytes_so_far)
sys.stdout.write("Downloaded {}\r".format(b_s))

def get_string(self, url, progress = True, headers = None):
Expand Down

0 comments on commit 8ed78c8

Please sign in to comment.