Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Merge requests
!11
rewrote expanding to allow blacklisting
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
rewrote expanding to allow blacklisting
topic/default/blacklisting
into
branch/default
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
Vincent Hatakeyama
requested to merge
topic/default/blacklisting
into
branch/default
4 years ago
Overview
0
Commits
3
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
version 2
version 3
a8b42414
4 years ago
version 2
3367490f
4 years ago
version 1
1009917f
4 years ago
branch/default (base)
and
version 3
latest version
46ae7be2
3 commits,
4 years ago
version 3
a8b42414
1 commit,
4 years ago
version 2
3367490f
1 commit,
4 years ago
version 1
1009917f
1 commit,
4 years ago
Show latest version
1 file
+
9
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
odoo_scripts/config.py
+
9
−
5
Options
@@ -3,6 +3,7 @@
import
configparser
import
logging
import
os
import
re
import
sys
from
collections
import
defaultdict
from
glob
import
glob
@@ -60,6 +61,13 @@
_logger
.
error
(
"
Expansion without path for %s
"
,
name
)
raise
Exception
(
"
Expansion without path for %s
"
%
name
)
else
:
if
not
blacklist
or
value
[
"
path
"
]
not
in
glob
(
blacklist
):
if
blacklist
and
re
.
match
(
blacklist
,
value
[
"
path
"
]):
_logger
.
info
(
"
Ignoring directory
'
%s
'
due to blacklisting
"
,
value
[
"
path
"
],
)
else
:
if
path
:
value
[
"
path
"
]
=
os
.
path
.
join
(
path
,
value
[
"
path
"
])
# read expanded configurations
self
.
_expanded_configuration
[
name
]
=
Configuration
(
**
value
)
@@ -64,9 +72,5 @@
# read expanded configurations
self
.
_expanded_configuration
[
name
]
=
Configuration
(
**
value
)
else
:
_logger
.
info
(
"
Ignoring %s due to blacklisting
"
,
value
[
"
path
"
]
)
def
set_from_glob_values
(
base
:
Optional
[
str
],
glob_values
:
List
[
str
]
Loading