diff options
author | Yang Zhao <yang.zhao@skyboxlabs.com> | 2019-12-13 15:52:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-01-15 12:53:40 -0800 |
commit | 5a5577d808668a7859c5009ddfa18b097368ba2c (patch) | |
tree | c3775b0bd73282e23af9544aa58a99d13d2fa356 /git-p4.py | |
parent | d38208a297e76bbfbfa8e485632c217aaafa9486 (diff) | |
download | git-5a5577d808668a7859c5009ddfa18b097368ba2c.tar.gz |
git-p4: open .gitp4-usercache.txt in text mode
Opening .gitp4-usercache.txt in text mode makes python 3 happy without
explicitly adding encoding and decoding.
Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com>
Reviewed-by: Ben Keene <seraphire@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1395,14 +1395,14 @@ class P4UserMap: for (key, val) in self.users.items(): s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1)) - open(self.getUserCacheFilename(), "wb").write(s) + open(self.getUserCacheFilename(), 'w').write(s) self.userMapFromPerforceServer = True def loadUserMapFromCache(self): self.users = {} self.userMapFromPerforceServer = False try: - cache = open(self.getUserCacheFilename(), "rb") + cache = open(self.getUserCacheFilename(), 'r') lines = cache.readlines() cache.close() for line in lines: |