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
145b4cd9
Commit
145b4cd9
authored
Oct 09, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect config file settings for debug - only reset if not set in CLI, env, or config file
parent
13e48496
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
config.py
vidai/config.py
+9
-6
No files found.
vidai/config.py
View file @
145b4cd9
...
@@ -33,27 +33,30 @@ def initialize_config(cli_args=None) -> None:
...
@@ -33,27 +33,30 @@ 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: reset to false unless explicitly set via CLI or env var
# Special handling for debug: reset to false unless explicitly set via CLI, env var, or config file
# (ignore config file settings to prevent persistent debug from config files)
debug_explicitly_set
=
False
debug_explicitly_set
=
False
if
cli_args
and
hasattr
(
cli_args
,
'debug'
)
and
cli_args
.
debug
:
if
cli_args
and
hasattr
(
cli_args
,
'debug'
)
and
cli_args
.
debug
:
debug_explicitly_set
=
True
debug_explicitly_set
=
True
if
f
'VIDAI_DEBUG'
in
os
.
environ
:
elif
f
'VIDAI_DEBUG'
in
os
.
environ
:
debug_explicitly_set
=
True
elif
'debug'
in
initial_config
and
initial_config
[
'debug'
]
!=
DEFAULTS
[
'debug'
]:
debug_explicitly_set
=
True
debug_explicitly_set
=
True
if
not
debug_explicitly_set
:
if
not
debug_explicitly_set
:
# Reset debug to false if not explicitly set via CLI
or env
# Reset debug to false if not explicitly set via CLI
, env, or config file
initial_config
[
'debug'
]
=
'false'
initial_config
[
'debug'
]
=
'false'
# Special handling for debug_web: same logic as debug
# Special handling for debug_web: same logic as debug
debug_web_explicitly_set
=
False
debug_web_explicitly_set
=
False
if
cli_args
and
hasattr
(
cli_args
,
'debug_web'
)
and
cli_args
.
debug_web
:
if
cli_args
and
hasattr
(
cli_args
,
'debug_web'
)
and
cli_args
.
debug_web
:
debug_web_explicitly_set
=
True
debug_web_explicitly_set
=
True
if
f
'VIDAI_DEBUG_WEB'
in
os
.
environ
:
elif
f
'VIDAI_DEBUG_WEB'
in
os
.
environ
:
debug_web_explicitly_set
=
True
elif
'debug_web'
in
initial_config
and
initial_config
[
'debug_web'
]
!=
DEFAULTS
[
'debug_web'
]:
debug_web_explicitly_set
=
True
debug_web_explicitly_set
=
True
if
not
debug_web_explicitly_set
:
if
not
debug_web_explicitly_set
:
# Reset debug_web to false if not explicitly set via CLI
or env
# Reset debug_web to false if not explicitly set via CLI
, env, or config file
initial_config
[
'debug_web'
]
=
'false'
initial_config
[
'debug_web'
]
=
'false'
# Store all environment variables that start with VIDAI_
# Store all environment variables that start with 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