Changeset - 72f144e1fffb
[Not reviewed]
0 3 0
Brett Smith - 4 years ago 2020-09-03 13:45:31
brettcsmith@brettcsmith.org
extract_odf_links: Make "not found" warning easier to parse.

e.g., you can just use `grep | cut -b N-`.
3 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/tools/extract_odf_links.py
Show inline comments
...
 
@@ -175,3 +175,3 @@ def main(arglist: Optional[Sequence[str]]=None,
 
                if not path.exists():
 
                   logger.warning("path %s not found", path)
 
                   logger.warning("link path not found: %s", path)
 
                print(path, end=args.delimiter, file=stdout)
setup.py
Show inline comments
...
 
@@ -7,3 +7,3 @@ setup(
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.9.2',
 
    version='1.9.3',
 
    author='Software Freedom Conservancy',
tests/test_extract_odf_links.py
Show inline comments
...
 
@@ -28,2 +28,3 @@ from conservancy_beancount.tools import extract_odf_links
 
SRC_PATH = testutil.test_path('repository/LinksReport.ods')
 
BAD_PATH_S = str(testutil.test_path('repository/Projects/Bad Link.txt'))
 

	
...
 
@@ -65,3 +66,4 @@ def test_extract_file_links(arglist, sep, caplog):
 
        log.levelname == 'WARNING'
 
        and log.message.endswith('/Bad Link.txt not found')
 
        and log.message.startswith('link path not found: ')
 
        and log.message.endswith(BAD_PATH_S)
 
        for log in caplog.records
0 comments (0 inline, 0 general)