Skip to content

Commit

Permalink
Appending shell environment (dsoprea#71)
Browse files Browse the repository at this point in the history
* Appending shell environment

* Copying for mutation prevention

* Fixing @dsoprea's comment
  • Loading branch information
tusharmakkar08 authored and dsoprea committed Sep 29, 2016
1 parent de11ebc commit cfaabe8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions svn/common.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import collections
import logging
import os
import subprocess
import logging
import dateutil.parser
import collections
import xml.etree.ElementTree

import dateutil.parser

import svn.constants

_logger = logging.getLogger('svn')
Expand Down Expand Up @@ -50,10 +51,13 @@ def run_command(self, subcommand, args, success_code=0,

_logger.debug("RUN: %s" % (cmd,))

environment_variables = os.environ.copy()
environment_variables['LANG'] = 'en_US.UTF-8'

p = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env={'LANG': 'en_US.UTF-8'})
env=environment_variables)

stdout = p.stdout.read()
r = p.wait()
Expand Down

0 comments on commit cfaabe8

Please sign in to comment.