Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #28 from NoRedInk/revert-27
Browse files Browse the repository at this point in the history
Revert "Merge pull request #27 from NoRedInk/add-urlretrieve-timeouts"
  • Loading branch information
leapingfrogs authored Mar 8, 2018
2 parents f5bd06c + 1f93a05 commit 1b3b1ec
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions native_package_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
import os
import sys
import tarfile
import requests
try:
# For Python 3.0 and later
from urllib.request import urlretrieve
except ImportError:
# Fall back to Python 2's urllib2
from urllib import urlretrieve

import elm_package
import exact_dependencies
Expand Down Expand Up @@ -82,13 +87,6 @@ def vendor_package_dir(vendor_dir, package):
)


def urlretrieve(url, filename, timeout = 60):
response = requests.get(url, timeout=timeout, stream=True)
response.raise_for_status()
with open(filename, "wb") as output:
for chunk in response.iter_content(4096):
output.write(chunk)

def fetch_packages(vendor_dir, packages):
"""
Fetches all packages from github.
Expand Down

0 comments on commit 1b3b1ec

Please sign in to comment.