Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Prevent unhandled exception when packages is not iterable #1074

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffatwork
Copy link

This happens consistently when installed on Windows 10 WSL with Ubuntu
18.04 from a clean install of Windows, WSL, and Atom.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

With a virgin install, following the flight manual instructions of Atom on Windows 10 WSL Ubuntu 18.04, an unhandled exception occurs "TypeError: packages is not iterable".

This exception occurs when you click "Install a Package" -> Open Installer -> + Install

While I do not know why this error is occurring and the packages object is not properly instantiated to an iterable null set, the fix I provided simply ensures that object is iterable. If the object is not iterable, it returns and thus does not attempt the iteration loop.

Alternate Designs

No alternate designs were considered.

Benefits

Prevents unhandled exception and allows Atom to install new packages.

Possible Drawbacks

None, if the packages object is iterable, the original code operates as before. No logic changes have been introduced.

Applicable Issues

atom/atom#17658

This happens consistently when installed on Windows 10 WSL with Ubuntu
18.04 from a clean install
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants