summaryrefslogtreecommitdiff
path: root/src/virtualenv/util/path
diff options
context:
space:
mode:
authorBernát Gábor <bgabor8@bloomberg.net>2020-03-08 10:07:26 +0000
committerGitHub <noreply@github.com>2020-03-08 10:07:26 +0000
commit895c2a920edc18d79388af7bf068f790c29668b3 (patch)
tree0af8a54cd42bb87d5f1a92120116fe1e5c835768 /src/virtualenv/util/path
parent663cb747f1a7438e35fa14e578b3f55ba0d9a5fb (diff)
downloadvirtualenv-895c2a920edc18d79388af7bf068f790c29668b3.tar.gz
pythonw works as python on Windows (#1693)
* pythonw works as python on Windows Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net> * foix
Diffstat (limited to 'src/virtualenv/util/path')
-rw-r--r--src/virtualenv/util/path/_pathlib/via_os_path.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/virtualenv/util/path/_pathlib/via_os_path.py b/src/virtualenv/util/path/_pathlib/via_os_path.py
index 6ce7b43..31c6c31 100644
--- a/src/virtualenv/util/path/_pathlib/via_os_path.py
+++ b/src/virtualenv/util/path/_pathlib/via_os_path.py
@@ -78,8 +78,11 @@ class Path(object):
os.makedirs(self._path)
def read_text(self, encoding="utf-8"):
+ return self.read_bytes().decode(encoding)
+
+ def read_bytes(self):
with open(self._path, "rb") as file_handler:
- return file_handler.read().decode(encoding)
+ return file_handler.read()
def write_text(self, text, encoding="utf-8"):
with open(self._path, "wb") as file_handler: