From 8bc37f7ae54c3f86b31b69c29d37bf9deee8a1eb Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 8 Apr 2024 10:05:26 -0500 Subject: [PATCH] warnings instead of prints --- circup/command_utils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/circup/command_utils.py b/circup/command_utils.py index 842d645..13a30ef 100644 --- a/circup/command_utils.py +++ b/circup/command_utils.py @@ -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: