From bfa0e7e63b43e3ca62c3ffaa12eed911b9677aff Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 7 Apr 2021 19:06:50 -0500 Subject: [PATCH] Conda: protect against None when appending core requirements `pip` can be defined as https://github.com/LFPy/LFPy/blob/b38146fb94dc933f5c40afd872369502031b9537/doc/environment.yml#L16 Ref https://sentry.io/organizations/read-the-docs/issues/2317539725/?environment=production&project=148442&referrer=alert_email --- readthedocs/doc_builder/python_environments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py index 5abe1209833..beecb562ea1 100644 --- a/readthedocs/doc_builder/python_environments.py +++ b/readthedocs/doc_builder/python_environments.py @@ -615,7 +615,8 @@ def _append_core_requirements(self): for item in dependencies: if isinstance(item, dict) and 'pip' in item: - pip_requirements.extend(item.get('pip', [])) + # NOTE: pip can be ``None`` + pip_requirements.extend(item.get('pip') or []) dependencies.remove(item) break