diff options
-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, |