We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bdbef8 commit eefced1Copy full SHA for eefced1
packet/__init__.py
@@ -16,11 +16,13 @@
16
app = Flask(__name__)
17
18
# Load default configuration and any environment variable overrides
19
-app.config.from_pyfile(os.path.join(os.getcwd(), "config.env.py"))
+_root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
20
+app.config.from_pyfile(os.path.join(_root_dir, "config.env.py"))
21
22
# Load file based configuration overrides if present
-if os.path.exists(os.path.join(os.getcwd(), "config.py")):
23
- app.config.from_pyfile(os.path.join(os.getcwd(), "config.py"))
+_pyfile_config = os.path.join(_root_dir, "config.py")
24
+if os.path.exists(_pyfile_config):
25
+ app.config.from_pyfile(_pyfile_config)
26
27
app.config["VERSION"] = __version__
28
0 commit comments