From aba171656d37569e8c3e5e7f5b6ca1094e884782 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 13 Jul 2023 09:47:38 -0500 Subject: [PATCH] throw an exception if os.getenv is used on a board without settings.toml support --- shared-bindings/os/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c index 18fec53049..d8d4f404e8 100644 --- a/shared-bindings/os/__init__.c +++ b/shared-bindings/os/__init__.c @@ -122,7 +122,7 @@ STATIC mp_obj_t os_getenv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ return common_hal_os_getenv(mp_obj_str_get_str(args[ARG_key].u_obj), args[ARG_default].u_obj); #else - return mp_const_none; + mp_raise_NotImplementedError(NULL); #endif } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(os_getenv_obj, 1, os_getenv);