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