warnings instead of prints

This commit is contained in:
foamyguy 2024-04-08 10:05:26 -05:00
parent e86487776f
commit 8bc37f7ae5

View file

@ -7,6 +7,7 @@ Functions called from commands in order to provide behaviors and return informat
import ctypes
import os
import warnings
from subprocess import check_output
import sys
@ -107,9 +108,15 @@ def ensure_latest_bundle(bundle):
for platform in PLATFORMS:
# missing directories (new platform added on an existing install
# or side effect of pytest or network errors)
print(
f"checking dir: {bundle.lib_dir(platform)} = "
f"{os.path.isdir(bundle.lib_dir(platform))}"
# print(
# f"checking dir: {bundle.lib_dir(platform)} = "
# f"{os.path.isdir(bundle.lib_dir(platform))}"
# )
warnings.warn(
UserWarning(
f"checking dir: {bundle.lib_dir(platform)} = "
f"{os.path.isdir(bundle.lib_dir(platform))}"
)
)
do_update = do_update or not os.path.isdir(bundle.lib_dir(platform))
else: