Skip to content

Commit

Permalink
Merge pull request #22156 from ccordoba12/issue-22054
Browse files Browse the repository at this point in the history
PR: Fix error when we can't detect Spyder in `conda list` output (Utils)
  • Loading branch information
ccordoba12 committed Jun 11, 2024
2 parents 8a3dff2 + a890dff commit cbb94d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spyder/utils/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ def get_spyder_conda_channel():
if 'error' in out:
return None, None

# These variables can be unassigned after the next for, so we need to give
# them a default value at this point.
# Fixes spyder-ide/spyder#22054
channel, channel_url = None, None

for package_info in out:
if package_info["name"] == 'spyder':
channel = package_info["channel"]
Expand Down

0 comments on commit cbb94d1

Please sign in to comment.