Skip to content

Commit

Permalink
startup: Use universal newlines (#1952)
Browse files Browse the repository at this point in the history
* startup: Use universal newlines

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

* Remove %s
  • Loading branch information
HuidaeCho authored and neteler committed Mar 24, 2022
1 parent 59d1c44 commit 982167a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 982167a

Please sign in to comment.