mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-22 11:50:28 +03:00
config.py: Compatibility layer for newer API calls.
This way a plugin updated for 5.0.0+ will work on next stable release.
This commit is contained in:
parent
e089c567c5
commit
eed8db965a
12
config.py
12
config.py
@ -160,12 +160,24 @@ class Config(object):
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_str(self, key):
|
||||
return self.get(key)
|
||||
|
||||
def get_list(self, key):
|
||||
return self.get(key)
|
||||
|
||||
def get_bool(self, key):
|
||||
return self.get(key)
|
||||
|
||||
def getint(self, key):
|
||||
try:
|
||||
return int(self.settings.get(key, 0)) # should already be int, but check by casting
|
||||
except:
|
||||
return 0
|
||||
|
||||
def get_int(self, key):
|
||||
return self.getint(key)
|
||||
|
||||
def set(self, key, val):
|
||||
self.settings[key] = val
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user