Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Dec 31, 2019
1 parent 28e4509 commit 2f440b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def _download_solc(url, show_progress):

def _install_solc_linux(version, show_progress):
download = DOWNLOAD_BASE.format(version, "solc-static-linux")
binary_path = _check_for_installed_version(version, show_progress)
binary_path = _check_for_installed_version(version)
if binary_path:
LOGGER.info("Downloading solc {} from {}".format(version, download))
content = _download_solc(download, show_progress)
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def nosolc():
temp_path = path.parent.joinpath('.temp')
path.rename(temp_path)
yield
shutil.rmtree(path)
if path.exists():
shutil.rmtree(path)
temp_path.rename(path)


Expand Down
5 changes: 3 additions & 2 deletions tests/test_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def test_threadlock(nosolc):


def test_processlock(nosolc):
mp.set_start_method('spawn')
threads = [mp.Process(target=solcx.install_solc, args=('0.5.0',),) for i in range(4)]
# have to use a context here to prevent a conflict with tqdm
ctx = mp.get_context('spawn')
threads = [ctx.Process(target=solcx.install_solc, args=('0.5.0',),) for i in range(4)]
for t in threads:
t.start()
solcx.install_solc('0.5.0')
Expand Down

0 comments on commit 2f440b4

Please sign in to comment.