Skip to content

Commit 68a6a13

Browse files
committed
fix wrong parameter for universal_newlines in Popen call
1 parent 5bd5dcc commit 68a6a13

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

venvipy/creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def clone_repo(command):
6262
Clone a repository and install it into a virtual environment.
6363
"""
6464
process = Popen(
65-
shlex.split(command), stdout=PIPE, universal_newlines="utf-8"
65+
shlex.split(command), stdout=PIPE, universal_newlines=True
6666
)
6767
while True:
6868
output = process.stdout.readline()
@@ -138,7 +138,7 @@ def create_venv(
138138
res = Popen(
139139
["bash", "-c", script],
140140
stdout=PIPE,
141-
universal_newlines="utf-8"
141+
universal_newlines=True
142142
)
143143
out, _ = res.communicate()
144144
output = out.strip()

venvipy/get_data.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from dataclasses import dataclass
1212

1313

14-
__version__ = "0.2.17"
14+
__version__ = "0.2.18"
1515

1616
CFG_DIR = os.path.expanduser("~/.venvipy")
1717
DB_FILE = os.path.expanduser("~/.venvipy/py-installs")
@@ -71,7 +71,7 @@ def get_python_version(py_path):
7171
res = Popen(
7272
[py_path, "-V"],
7373
stdout=PIPE,
74-
universal_newlines="utf-8"
74+
universal_newlines=True
7575
)
7676
out, _ = res.communicate()
7777
python_version = out.strip()
@@ -291,9 +291,3 @@ def get_package_infos(name):
291291
package_info_list.append(pkg_info)
292292

293293
return package_info_list[::-1]
294-
295-
296-
297-
if __name__ == "__main__":
298-
299-
get_python_installs()

0 commit comments

Comments
 (0)