Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions bockbuild/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
import functools


# FancyURLopener is incorrectly documented; this working handler was
# copied from
# https://mail.python.org/pipermail/python-bugs-list/2006-February/032155.html
class MyUrlOpener(urllib.FancyURLopener):

def http_error_default(*args, **kwargs):
return urllib.URLopener.http_error_default(*args, **kwargs)


class Package:

def __init__(self, name, version=None, organization=None, configure_flags=None, sources=None, revision=None, git_branch=None, source_dir_name=None, override_properties=None, configure=None):
Expand Down Expand Up @@ -292,11 +283,10 @@ def define():
def checkout_archive(archive, cache_dest, workspace_dir):
def create_cache():
progress('Downloading: %s' % archive)
try:
filename, message = MyUrlOpener().retrieve(archive, cache_dest)
except IOError as e:
raise CommandException(
'%s error downloading %s' % (e[1], archive))
curl_bin = which('curl')
if not curl_bin:
error('curl not found in PATH')
run (curl_bin,['-L','-o', cache_dest, archive], None)

def update_cache():
pass
Expand Down
2 changes: 1 addition & 1 deletion bockbuild/util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def run(cmd, args, cwd, env=None):
proc = subprocess.Popen(cmd_list, shell=False, cwd=cwd,
env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except Exception as e:
error(e)
error(str(e))

stdout, stderr = proc.communicate()
exit_code = proc.returncode
Expand Down