Skip to content

Commit

Permalink
svn subprocess environment customization (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
daa authored and dsoprea committed Oct 3, 2016
1 parent 9e03533 commit ee9d7fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions svn/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, url_or_path, type_, *args, **kwargs):
self.__password = kwargs.pop('password', None)
self.__svn_filepath = kwargs.pop('svn_filepath', 'svn')
self.__trust_cert = kwargs.pop('trust_cert', None)
self.__env = kwargs.get('env', {})

if type_ not in (svn.constants.LT_URL, svn.constants.LT_PATH):
raise SvnException("Type is invalid: %s" % type_)
Expand All @@ -52,6 +53,7 @@ def run_command(self, subcommand, args, success_code=0,
_logger.debug("RUN: %s" % (cmd,))

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

p = subprocess.Popen(cmd,
Expand Down

0 comments on commit ee9d7fa

Please sign in to comment.