Changeset - cf2833ee201e
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-06-16 19:10:19
brettcsmith@brettcsmith.org
plugin: Load user configuration file.
2 files changed with 14 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/__init__.py
Show inline comments
...
 
@@ -17,2 +17,3 @@
 
import importlib
 
import logging
 

	
...
 
@@ -44,2 +45,3 @@ from .core import (
 
from ..errors import (
 
    ConfigurationError,
 
    Error,
...
 
@@ -49,2 +51,4 @@ __plugins__ = ['run']
 

	
 
logger = logging.getLogger('conservancy_beancount.plugin')
 

	
 
class HookRegistry:
...
 
@@ -137,2 +141,11 @@ def run(
 
    user_config = configmod.Config()
 
    try:
 
        user_config.load_file()
 
    except OSError as error:
 
        logger.debug("error reading configuration file %s: %s",
 
                     error.filename, error.strerror, exc_info=True)
 
        errors.append(ConfigurationError(
 
            f"error reading configuration file {error.filename}: {error.strerror}",
 
            source={'filename': error.filename},
 
        ))
 
    for key, hook_type in hook_registry.group_by_directive(config):
setup.py
Show inline comments
...
 
@@ -7,3 +7,3 @@ setup(
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.2.2',
 
    version='1.2.3',
 
    author='Software Freedom Conservancy',
0 comments (0 inline, 0 general)