Merge lp:~gz/brz/win32_unicode_argv_3.0 into lp:brz/3.0

Proposed by Martin Packman
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~gz/brz/win32_unicode_argv_3.0
Merge into: lp:brz/3.0
Diff against target: 14 lines (+1/-3)
1 file modified
breezy/osutils.py (+1/-3)
To merge this branch: bzr merge lp:~gz/brz/win32_unicode_argv_3.0
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+371433@code.launchpad.net

Commit message

Make win32 setup of get_unicode_arg saner

Description of the change

Make win32 setup of get_unicode_arg saner

On a platform that reports as win32 but lacks ctypes use the same
logic as nix which decodes according to user encoding, rather than
falling over on attribute lookup.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/osutils.py'
2--- breezy/osutils.py 2019-03-06 10:26:59 +0000
3+++ breezy/osutils.py 2019-08-18 22:56:00 +0000
4@@ -520,9 +520,7 @@
5 """Replacer for shutil.rmtree: could remove readonly dirs/files"""
6 return shutil.rmtree(path, ignore_errors, onerror)
7
8- f = win32utils.get_unicode_argv # special function or None
9- if f is not None:
10- get_unicode_argv = f
11+ get_unicode_argv = getattr(win32utils, 'get_unicode_argv', get_unicode_argv)
12 path_from_environ = win32utils.get_environ_unicode
13 _get_home_dir = win32utils.get_home_location
14 getuser_unicode = win32utils.get_user_name

Subscribers

People subscribed via source and target branches