mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
add default value to trezor.storage.get
This commit is contained in:
parent
ddf6771981
commit
9ed3b24edf
@ -27,10 +27,10 @@ STATIC mp_obj_t mod_TrezorStorage_Storage_make_new(const mp_obj_type_t *type, si
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
STATIC mp_obj_t mod_TrezorStorage_Storage_get(mp_obj_t self, mp_obj_t name) {
|
||||
STATIC mp_obj_t mod_TrezorStorage_Storage_get(mp_obj_t self, mp_obj_t name, mp_obj_t defval) {
|
||||
return mp_const_none;
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorStorage_Storage_get_obj, mod_TrezorStorage_Storage_get);
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorStorage_Storage_get_obj, mod_TrezorStorage_Storage_get);
|
||||
|
||||
STATIC mp_obj_t mod_TrezorStorage_Storage_set(mp_obj_t self, mp_obj_t name, mp_obj_t value) {
|
||||
return mp_const_none;
|
||||
|
@ -3,8 +3,8 @@ from TrezorStorage import Storage
|
||||
_storage = Storage()
|
||||
|
||||
|
||||
def get(name):
|
||||
return _storage.get(name)
|
||||
def get(name, defval=None):
|
||||
return _storage.get(name, defval)
|
||||
|
||||
|
||||
def set(name, value):
|
||||
|
Loading…
Reference in New Issue
Block a user