Skip to content

Commit 44c6563

Browse files
authored
Merge pull request #8206 from dhalbert/8.2.x-backport-8169-getenv-notimplemented
8.2.x backport: throw an exception if os.getenv is used on a board without settings.t…
2 parents 613dda8 + aba1716 commit 44c6563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-bindings/os/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ STATIC mp_obj_t os_getenv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_
122122

123123
return common_hal_os_getenv(mp_obj_str_get_str(args[ARG_key].u_obj), args[ARG_default].u_obj);
124124
#else
125-
return mp_const_none;
125+
mp_raise_NotImplementedError(NULL);
126126
#endif
127127
}
128128
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(os_getenv_obj, 1, os_getenv);

0 commit comments

Comments
 (0)