Add common value processing with aiee

This commit is contained in:
lash 2022-05-12 18:21:18 +00:00
parent f5ab76e81a
commit 7a13d25524
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -1,3 +1,6 @@
# external imports
from aiee.numbers import postfix_to_int
# local imports
from .chain import ChainSpec
@ -28,6 +31,19 @@ def process_settings_common(settings, config):
return settings
def process_settings_value(settings, config):
value = None
try:
value = config.get('_VALUE')
except KeyError:
return settings
value = postfix_to_int(config.get('_VALUE'))
settings.set('VALUE', value)
return settings
def process_settings(settings, config):
settings = process_settings_common(settings, config)
settings = process_settings_value(settings, config)
return settings