Skip to content

Commit

Permalink
Merge from 5.x: PR #20329
Browse files Browse the repository at this point in the history
Fixes #20309
  • Loading branch information
ccordoba12 committed Jan 10, 2023
2 parents 28b9245 + 1ff41d5 commit bf1f729
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spyder/utils/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ def get_user_environment_variables():
cmd = "printenv"
proc = run_shell_command(cmd)
stdout, stderr = proc.communicate()
res = stdout.decode().strip().split(os.linesep)

try:
res = stdout.decode().strip().split(os.linesep)
except Exception:
return {}

env_var = {}
for kv in res:
try:
Expand Down

0 comments on commit bf1f729

Please sign in to comment.