Merge pull request #8169 from jepler/os-getenv-exception
throw an exception if os.getenv is used on a board without settings.t…
This commit is contained in:
commit
8de9d5a522
|
@ -103,7 +103,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);
|
return common_hal_os_getenv(mp_obj_str_get_str(args[ARG_key].u_obj), args[ARG_default].u_obj);
|
||||||
#else
|
#else
|
||||||
return mp_const_none;
|
mp_raise_NotImplementedError(NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(os_getenv_obj, 1, os_getenv);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(os_getenv_obj, 1, os_getenv);
|
||||||
|
|
Loading…
Reference in New Issue