From acb434c14c9b0166e7e375b2f08d567453cf2e50 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Thu, 3 Dec 2020 15:30:23 -0700 Subject: [PATCH] Handle the situation where get_rust_version() returns None --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2328751..09fd433 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,8 @@ class build_rust(_build_rust): def run(self): try: - nightly = "nightly" in get_rust_version().prerelease + rustc = get_rust_version() + nightly = rustc.prerelease is not None and "nightly" in rustc.prerelease except DistutilsPlatformError: if sys.platform in ("linux", "darwin"): self.setup_temp_rustc_unix(toolchain="nightly", profile="minimal")