Gotta feed the file path, not the file itself

This commit is contained in:
Alexandre Aubin 2019-08-04 18:45:42 +02:00
parent f462a22b27
commit c6f653822e

View file

@ -180,9 +180,8 @@ def log_display(path, number=50, share=False):
# Display metadata if exist
if os.path.exists(md_path):
with open(md_path, "r") as md_file:
try:
metadata = read_yaml(md_file)
metadata = read_yaml(md_path)
except MoulinetteError as e:
error = m18n.n('log_corrupted_md_file', md_file=md_path, error=e)
if os.path.exists(log_path):