Skip to content

Commit

Permalink
making uranium py2.6 compatible again
Browse files Browse the repository at this point in the history
  • Loading branch information
toumorokoshi committed Mar 9, 2015
1 parent ab8fede commit c9f56c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions uranium/virtualenv_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ def inject_sitepy(venv_root):

def _get_site_file_path(venv_directory):
executable = os.path.join(venv_directory, 'bin', 'python')
return subprocess.check_output(
[executable, "-c", "import site; print(site.__file__)"]
return subprocess.Popen(
[executable, "-c", "import site; print(site.__file__)"],
stdout=subprocess.PIPE
# we strip the last character because it is a .pyc file.
# want the .py
)[:-2]
).communicate()[:-2]


def inject_into_file(path, body):
Expand Down

0 comments on commit c9f56c8

Please sign in to comment.