Skip to content

Commit df5c3a4

Browse files
committed
Move None check
1 parent b89dfef commit df5c3a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmdstanpy/install_cmdstan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ def is_version_available(version: str) -> bool:
457457

458458
def retrieve_version(version: str, progress: bool = True) -> None:
459459
"""Download specified CmdStan version."""
460+
if version is None or version == '':
461+
raise ValueError('Argument "version" unspecified.')
460462

461463
if 'git:' in version:
462464
tag = version.split(':')[1]
@@ -478,8 +480,6 @@ def retrieve_version(version: str, progress: bool = True) -> None:
478480
)
479481
return
480482

481-
if version is None or version == '':
482-
raise ValueError('Argument "version" unspecified.')
483483
print('Downloading CmdStan version {}'.format(version))
484484
url = get_download_url(version)
485485
for i in range(6): # always retry to allow for transient URLErrors

0 commit comments

Comments
 (0)