You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
mpos.config.py: fix default string values
This commit is contained in:
@@ -35,7 +35,10 @@ class SharedPreferences:
|
||||
|
||||
def get_string(self, key, default=None):
|
||||
"""Retrieve a string value for the given key, with a default if not found."""
|
||||
return str(self.data.get(key, default))
|
||||
to_return = self.data.get(key)
|
||||
if not to_return and default:
|
||||
to_return = default
|
||||
return to_return
|
||||
|
||||
def get_int(self, key, default=0):
|
||||
"""Retrieve an integer value for the given key, with a default if not found."""
|
||||
|
||||
Reference in New Issue
Block a user