Skip to content

Commit 6e422f2

Browse files
committed
Minor changelog tweaks
1 parent 2157e8e commit 6e422f2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

openeo_driver/util/changelog.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
import sys
23
import re
34
from pathlib import Path
@@ -6,6 +7,8 @@
67
import jinja2
78
import markdown
89

10+
_log = logging.getLogger(__name__)
11+
912
MULTI_PROJECT_CHANGELOG_TEMPLATE = """\
1013
<!DOCTYPE html>
1114
<html>
@@ -26,7 +29,9 @@
2629
<h1>{{ title }}</h1>
2730
{% for project in projects %}
2831
<h2 id="{{ project.name | lower }}">{{ project.name }} {{ project.version }}</h2>
29-
<div class="project-changelog">{{ project.changelog_html }}</div>
32+
{% if project.changelog_html %}
33+
<div class="project-changelog">{{ project.changelog_html }}</div>
34+
{% endif %}
3035
{% endfor %}
3136
</div>
3237
</body>
@@ -91,6 +96,8 @@ def get_changelog_path(
9196
installed_path = Path(sys.prefix) / data_files_dir / filename
9297
if installed_path.exists():
9398
return installed_path
99+
else:
100+
_log.warning(f"Failed to find changelog at {installed_path}")
94101

95102
# Path of changelog when running from source
96103
if src_root:

0 commit comments

Comments
 (0)