File: copy-os-environ-to-preserve-environment

package info (click to toggle)
python-hgapi 1.7.3%2Bgit20170127.dd8fb7b-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 240 kB
  • sloc: python: 893; makefile: 140; sh: 13
file content (17 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Copy os.environ to preseve external environment
Author: Anthony Low
Origin: upstream, https://bitbucket.org/haard/hgapi/pull-requests/24/copy-osenviron-so-the-real-one-isnt/diff
Forwarded: not-needed
Last-Update: 2018-12-10
---
--- a/hgapi/hgapi.py
+++ b/hgapi/hgapi.py
@@ -74,7 +74,7 @@
         self.cfg = False
         self.user = user
 
-    _env = os.environ
+    _env = os.environ.copy()
     _env[str('LANG')] = str('en_US')
 
     @classmethod