diff options
| author | David Pursehouse <dpursehouse@collab.net> | 2016-08-15 00:51:32 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-08-15 00:51:32 +0000 |
| commit | 69297c1b771bbbd05b63e965a524de6860d15d8c (patch) | |
| tree | c9d7c7041ff71ca3cb12c6ee65cd72897bfb5dfd | |
| parent | 8016f60a46845fdadbadd88c5746cdaabe476417 (diff) | |
| parent | 631d0ec708b5341ba02b821c120755fd814fbc0b (diff) | |
| download | git-repo-69297c1b771bbbd05b63e965a524de6860d15d8c.tar.gz | |
Merge "Support non-ASCII GNUPGHOME environment variable"
| -rwxr-xr-x | repo | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -432,7 +432,10 @@ def SetupGnuPG(quiet): | |||
| 432 | sys.exit(1) | 432 | sys.exit(1) |
| 433 | 433 | ||
| 434 | env = os.environ.copy() | 434 | env = os.environ.copy() |
| 435 | env['GNUPGHOME'] = gpg_dir.encode() | 435 | try: |
| 436 | env['GNUPGHOME'] = gpg_dir | ||
| 437 | except UnicodeEncodeError: | ||
| 438 | env['GNUPGHOME'] = gpg_dir.encode() | ||
| 436 | 439 | ||
| 437 | cmd = ['gpg', '--import'] | 440 | cmd = ['gpg', '--import'] |
| 438 | try: | 441 | try: |
| @@ -638,7 +641,10 @@ def _Verify(cwd, branch, quiet): | |||
| 638 | _print(file=sys.stderr) | 641 | _print(file=sys.stderr) |
| 639 | 642 | ||
| 640 | env = os.environ.copy() | 643 | env = os.environ.copy() |
| 641 | env['GNUPGHOME'] = gpg_dir.encode() | 644 | try: |
| 645 | env['GNUPGHOME'] = gpg_dir | ||
| 646 | except UnicodeEncodeError: | ||
| 647 | env['GNUPGHOME'] = gpg_dir.encode() | ||
| 642 | 648 | ||
| 643 | cmd = [GIT, 'tag', '-v', cur] | 649 | cmd = [GIT, 'tag', '-v', cur] |
| 644 | proc = subprocess.Popen(cmd, | 650 | proc = subprocess.Popen(cmd, |
