git.samba.org
/
jelmer
/
dulwich.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8fb96
)
readlink on Windows/python3 requires a unicode string.
author
Jelmer Vernooij
<jelmer@jelmer.uk>
Mon, 1 May 2017 13:58:25 +0000
(13:58 +0000)
committer
Jelmer Vernooij
<jelmer@jelmer.uk>
Mon, 1 May 2017 13:58:25 +0000
(13:58 +0000)
dulwich/index.py
patch
|
blob
|
history
diff --git
a/dulwich/index.py
b/dulwich/index.py
index f793ec73b5552e34441999b2b4e38c9524b8686d..0ad91aaf29703adce7bf6febbef11daf6fbfb7ea 100644
(file)
--- a/
dulwich/index.py
+++ b/
dulwich/index.py
@@
-545,6
+545,9
@@
def blob_from_path_and_stat(fs_path, st):
with open(fs_path, 'rb') as f:
blob.data = f.read()
else:
+ if sys.platform == 'win32' and sys.version_info[0] == 3:
+ # os.readlink on Python3 on Windows requires a unicode string.
+ fs_path = fs_path.decode(sys.getfilesystemencoding())
blob.data = os.readlink(fs_path)
return blob