diff options
author | Shawn O. Pearce <sop@google.com> | 2010-12-07 11:41:05 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2011-01-09 16:13:56 -0800 |
commit | f18cb761731a791bf1b9ee8c6308bfce5c9d3e62 (patch) | |
tree | 5b1440e04b3945177eb7033f40cf496e7e28ba34 /repo | |
parent | d3fd537ea59272e2141ccee839400a93c0196e36 (diff) | |
download | git-repo-f18cb761731a791bf1b9ee8c6308bfce5c9d3e62.tar.gz |
Encode the environment variables passed to git
Windows allows the environment to have unicode values.
This will cause Python to fail to execute the command.
Change-Id: I37d922c3d7ced0d5b4883f0220346ac42defc5e9
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -259,8 +259,8 @@ def _SetupGnuPG(quiet): | |||
259 | gpg_dir, e.strerror) | 259 | gpg_dir, e.strerror) |
260 | sys.exit(1) | 260 | sys.exit(1) |
261 | 261 | ||
262 | env = dict(os.environ) | 262 | env = os.environ.copy() |
263 | env['GNUPGHOME'] = gpg_dir | 263 | env['GNUPGHOME'] = gpg_dir.encode() |
264 | 264 | ||
265 | cmd = ['gpg', '--import'] | 265 | cmd = ['gpg', '--import'] |
266 | try: | 266 | try: |
@@ -378,8 +378,8 @@ def _Verify(cwd, branch, quiet): | |||
378 | % (branch, cur) | 378 | % (branch, cur) |
379 | print >>sys.stderr | 379 | print >>sys.stderr |
380 | 380 | ||
381 | env = dict(os.environ) | 381 | env = os.environ.copy() |
382 | env['GNUPGHOME'] = gpg_dir | 382 | env['GNUPGHOME'] = gpg_dir.encode() |
383 | 383 | ||
384 | cmd = [GIT, 'tag', '-v', cur] | 384 | cmd = [GIT, 'tag', '-v', cur] |
385 | proc = subprocess.Popen(cmd, | 385 | proc = subprocess.Popen(cmd, |