Skip to content

Commit

Permalink
Handle the situation where get_rust_version() returns None (#182)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Larralde <martin.larralde@ens-paris-saclay.fr>
  • Loading branch information
alexhenrie and althonos authored Dec 4, 2020
1 parent 831bd3a commit 599689d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 599689d

Please sign in to comment.