Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
f49cc826
Commit
f49cc826
authored
Oct 09, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset debug to false at startup unless explicitly set via CLI, config file, or environment variable
parent
b131f8a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
config.py
vidai/config.py
+14
-0
No files found.
vidai/config.py
View file @
f49cc826
...
@@ -33,6 +33,20 @@ def initialize_config(cli_args=None) -> None:
...
@@ -33,6 +33,20 @@ def initialize_config(cli_args=None) -> None:
initial_config
=
load_initial_config
(
cli_args
)
initial_config
=
load_initial_config
(
cli_args
)
# Special handling for debug: if not explicitly set via CLI, config file, or env var,
# reset it to false to prevent database-persisted debug settings from staying enabled
debug_explicitly_set
=
False
if
cli_args
and
hasattr
(
cli_args
,
'debug'
):
debug_explicitly_set
=
True
elif
'debug'
in
initial_config
and
initial_config
[
'debug'
]
!=
DEFAULTS
[
'debug'
]:
debug_explicitly_set
=
True
elif
f
'VIDAI_DEBUG'
in
os
.
environ
:
debug_explicitly_set
=
True
if
not
debug_explicitly_set
:
# Reset debug to false if not explicitly set
initial_config
[
'debug'
]
=
'false'
# Store all environment variables that start with VIDAI_
# Store all environment variables that start with VIDAI_
for
env_key
,
env_value
in
os
.
environ
.
items
():
for
env_key
,
env_value
in
os
.
environ
.
items
():
if
env_key
.
startswith
(
'VIDAI_'
):
if
env_key
.
startswith
(
'VIDAI_'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment