Make the PluginConfig class heritate the poezio Config
We can use the nice and safe get() method
This commit is contained in:
parent
cb2796abc5
commit
a090b235d7
1 changed files with 3 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
import os
|
||||
from configparser import ConfigParser
|
||||
import config
|
||||
import inspect
|
||||
import traceback
|
||||
|
||||
class PluginConfig(ConfigParser):
|
||||
class PluginConfig(config.Config):
|
||||
def __init__(self, filename):
|
||||
ConfigParser.__init__(self)
|
||||
self.__config_file__ = filename
|
||||
|
@ -23,6 +24,7 @@ class PluginConfig(ConfigParser):
|
|||
except IOError:
|
||||
return False
|
||||
|
||||
|
||||
class SafetyMetaclass(type):
|
||||
# A hack
|
||||
core = None
|
||||
|
|
Loading…
Reference in a new issue