Skip to content

Commit

Permalink
Fix --dump_config option; bump to 0.7.5
Browse files Browse the repository at this point in the history
The "print"s were accidentally removed in a cleanup
commit earlier.
  • Loading branch information
daethnir committed Oct 18, 2021
1 parent a020231 commit 4eb0cee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion authprogs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.7.4'
__version__ = '0.7.5'
__author__ = 'Bri Hatch <[email protected]>'
10 changes: 10 additions & 0 deletions authprogs/authprogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,20 @@ def load(self):
def dump_config(self):
"""Pretty print the configuration dict to stdout."""
yaml_content = self.get_merged_config()
print(
'Configuration Source:\n\t{}\n'.format(
yaml_content.read().replace('\n', '\n\t')
)
)
yaml_content.close()

try:
self.load()
print(
'Effective Configuration\n\t{}\n'.format(
pretty(self.yamldocs).replace('\n', '\n\t')
)
)
except ConfigError:
sys.stderr.write(
'config parse error. try running with --logfile=/dev/tty\n'
Expand Down
5 changes: 5 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
authprogs (0.7.5) testing; urgency=low
* Fix --dump_config option

-- Bri Hatch <[email protected]> Fri, 14 Mar 2021 13:59:26 -0800

authprogs (0.7.4) testing; urgency=low
* Add --version option

Expand Down

0 comments on commit 4eb0cee

Please sign in to comment.