diff --git a/import2ledger/config.py b/import2ledger/config.py index eb65cca13b6be4873617d8b932c0065d7c438bd5..e30ed9cacca50161bb7c869d3290eaf4e36d5220 100644 --- a/import2ledger/config.py +++ b/import2ledger/config.py @@ -9,7 +9,7 @@ import pathlib import babel import babel.numbers -from . import errors, strparse, template +from . import errors, strparse class Configuration: HOME_PATH = pathlib.Path(os.path.expanduser('~')) @@ -241,24 +241,6 @@ class Configuration: path = self.get_output_path(section_name) return self._open_path(path, self.stdout, 'a') - def get_template(self, config_key, section_name=None, factory=template.Template): - section_config = self.get_section(section_name) - try: - template_s = section_config[config_key] - except KeyError: - raise errors.UserInputConfigurationError( - "template not defined in [{}]".format(section_name or self.args.use_config), - config_key, - ) - return factory( - template_s, - date_fmt=section_config['date_format'], - signed_currencies=[code.strip().upper() for code in section_config['signed_currencies'].split(',')], - signed_currency_fmt=section_config['signed_currency_format'], - unsigned_currency_fmt=section_config['unsigned_currency_format'], - template_name=config_key, - ) - def setup_logger(self, logger, section_name=None): logger.setLevel(self.get_loglevel(section_name))