Browse Source

startup: Use universal newlines (#1952)

* startup: Use universal newlines

* wx is opened in universal newlines mode; juse use \n

* Remove %s
Huidae Cho 2 years ago
parent
commit
98dba90ea3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/init/grass.py

+ 1 - 1
lib/init/grass.py

@@ -1295,7 +1295,7 @@ def load_env(grass_env_file):
     # \1 and \2 are a variable name and its value, respectively.
     export_re = re.compile("^export[ \t]+([a-zA-Z_]+[a-zA-Z0-9_]*)=(.*?)[ \t]*$")
 
-    for line in readfile(grass_env_file).split(os.linesep):
+    for line in readfile(grass_env_file).splitlines():
         # match ^export lines
         m = export_re.match(line)
         # if not ^export lines, skip