Skip to content

Commit

Permalink
use tempfile for temporary install dir
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Sep 5, 2019
1 parent bd62875 commit 6f75275
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import subprocess
import sys
import tarfile
import tempfile
import zipfile
import logging

Expand Down Expand Up @@ -254,7 +255,7 @@ def _check_for_installed_version(version):


def _get_temp_folder():
path = Path(__file__).parent.joinpath('temp')
path = Path(tempfile.gettempdir()).joinpath('py-solc-x-tmp')
if path.exists():
shutil.rmtree(str(path))
path.mkdir()
Expand Down

0 comments on commit 6f75275

Please sign in to comment.