Doppelpunkt ':' als delimiter in der Config deaktiviert
This commit is contained in:
@@ -261,7 +261,7 @@ class IniBasedConfig:
|
|||||||
if not os.path.exists(self.config_path):
|
if not os.path.exists(self.config_path):
|
||||||
raise Exception("path does not exist")
|
raise Exception("path does not exist")
|
||||||
self._isInitalized = False
|
self._isInitalized = False
|
||||||
self._config = ConfigParser(allow_no_value=True)
|
self._config = ConfigParser(allow_no_value=True, delimiters=("="))
|
||||||
self._config.optionxform = lambda option: option # preserve case for letters
|
self._config.optionxform = lambda option: option # preserve case for letters
|
||||||
|
|
||||||
def from_cfg_str(self, cfg_str):
|
def from_cfg_str(self, cfg_str):
|
||||||
@@ -319,7 +319,7 @@ class BezeichnerConfig(IniBasedConfig):
|
|||||||
def __init__(self, config_dir='.', config_file='Bezeichner.cfg'):
|
def __init__(self, config_dir='.', config_file='Bezeichner.cfg'):
|
||||||
super().__init__(config_dir, config_file)
|
super().__init__(config_dir, config_file)
|
||||||
|
|
||||||
def getall(self):
|
def get_all(self):
|
||||||
"""hole alle möglichen Bezeichner """
|
"""hole alle möglichen Bezeichner """
|
||||||
return super().get_section_options("Bezeichner")
|
return super().get_section_options("Bezeichner")
|
||||||
|
|
||||||
@@ -352,19 +352,19 @@ class FertigungsartConfig(IniBasedConfig):
|
|||||||
"""
|
"""
|
||||||
return super().sections()
|
return super().sections()
|
||||||
|
|
||||||
def get_normen_of_type(self, ftype):
|
def get_list_in_section(self, section):
|
||||||
"""hole alle möglichen Oberflächen Behandlungsarten zum gegebenen Material
|
"""hole alle möglichen Oberflächen Behandlungsarten zum gegebenen Material
|
||||||
Allgemeintoleranz3DDruck ftype
|
Allgemeintoleranz3DDruck ftype
|
||||||
-> [ISO 2768:1991-fH, ISO 2768:1991-fK, ISO 2768:1991-fL, ISO 2768:1991-mH, , ...]
|
-> [ISO 2768:1991-fH, ISO 2768:1991-fK, ISO 2768:1991-fL, ISO 2768:1991-mH, , ...]
|
||||||
"""
|
"""
|
||||||
return super().get_section_options(ftype)
|
return super().get_section_options(section)
|
||||||
|
|
||||||
class HerstellerConfig(IniBasedConfig):
|
class HerstellerConfig(IniBasedConfig):
|
||||||
"""Auslesen der Config zu allen möglichen Hersteller"""
|
"""Auslesen der Config zu allen möglichen Hersteller"""
|
||||||
def __init__(self, config_dir='.', config_file='Hersteller.cfg'):
|
def __init__(self, config_dir='.', config_file='Hersteller.cfg'):
|
||||||
super().__init__(config_dir, config_file)
|
super().__init__(config_dir, config_file)
|
||||||
|
|
||||||
def getall(self):
|
def get_all(self):
|
||||||
"""hole alle möglichen Bezeichner """
|
"""hole alle möglichen Bezeichner """
|
||||||
return super().get_section_options("Hersteller")
|
return super().get_section_options("Hersteller")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user