Skip to content

Commit 24e35b0

Browse files
committed
v 1.1.7. - fixes instance config loading when installed as a package
1 parent 4f868a7 commit 24e35b0

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to ExaFS will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.7] - 2025-10-16
9+
10+
### Fixed
11+
- Fixed config loading to use Flask instance folder
12+
- Resolves path issues when package is installed via pip
13+
814
## [1.1.6] - 2025-10-08
915

1016
### Fixed
@@ -268,4 +274,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
268274
[0.5.0]: https://github.com/CESNET/exafs/compare/v0.4.8...v0.5.0
269275
[0.4.8]: https://github.com/CESNET/exafs/compare/v0.4.7...v0.4.8
270276
[0.4.7]: https://github.com/CESNET/exafs/compare/v0.4.6...v0.4.7
271-
[0.4.6]: https://github.com/CESNET/exafs/releases/tag/v0.4.6
277+
[0.4.6]: https://github.com/CESNET/exafs/releases/tag/v0.4.6
278+

flowapp/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.1.6"
1+
__version__ = "1.1.7"
22
__title__ = "ExaFS"
33
__description__ = "Tool for creation, validation, and execution of ExaBGP messages."
44
__author__ = "CESNET / Jiri Vrany, Petr Adamec, Josef Verich, Jakub Man"

flowapp/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
import os
23
from flask import Flask, redirect, render_template, session, url_for
34

45
from flask_sso import SSO
@@ -23,18 +24,20 @@
2324

2425

2526
def create_app(config_object=None):
26-
app = Flask(__name__)
27+
# Enable instance_relative_config to use /app/instance folder
28+
app = Flask(__name__, instance_relative_config=True)
2729

2830
# Load the default configuration for dashboard and main menu
2931
app.config.from_object(InstanceConfig)
3032
if config_object:
3133
app.config.from_object(config_object)
3234

3335
# Allow override of instance config from external file
36+
# This now looks in /app/instance/config_override.py instead of ../instance_config_override.py
3437
try:
35-
app.config.from_pyfile("../instance_config_override.py", silent=False)
36-
except FileNotFoundError:
37-
print("No instance_config_override.py found, using defaults.")
38+
app.config.from_pyfile("config_override.py", silent=False)
39+
except FileNotFoundError as e:
40+
print(f"Instance config override file not found: {e.filename}, using defaults.")
3841
pass # No override file, use defaults
3942

4043
app.config.setdefault("VERSION", __version__)

0 commit comments

Comments
 (0)