Conditions | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import logging |
||
23 | def list_journals(config): |
||
24 | from . import install |
||
25 | |||
26 | """List the journals specified in the configuration file""" |
||
27 | result = f"Journals defined in {install.CONFIG_FILE_PATH}\n" |
||
28 | ml = min(max(len(k) for k in config["journals"]), 20) |
||
29 | for journal, cfg in config["journals"].items(): |
||
30 | result += " * {:{}} -> {}\n".format( |
||
31 | journal, ml, cfg["journal"] if isinstance(cfg, dict) else cfg |
||
32 | ) |
||
33 | return result |
||
34 |