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
Commits
e06a5f573fba
Commit
e06a5f573fba
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
fix list_modules
parent
a27dd12a6cf7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
odoo_scripts/list_modules.py
+10
-12
10 additions, 12 deletions
odoo_scripts/list_modules.py
with
10 additions
and
12 deletions
odoo_scripts/list_modules.py
+
10
−
12
View file @
e06a5f57
#!/usr/bin/env python3
"""
Create the file odoo_modules_list from setup.cfg
"""
# vim: set shiftwidth=4 softtabstop=4:
...
...
@@ -2,10 +4,8 @@
# vim: set shiftwidth=4 softtabstop=4:
# Create the file odoo_modules_list from setup.cfg
#
# template version 2.7
import
argparse
import
configparser
import
logging
import
os
...
...
@@ -6,9 +6,8 @@
# template version 2.7
import
argparse
import
configparser
import
logging
import
os
import
subprocess
import
sys
...
...
@@ -13,7 +12,5 @@
import
sys
import
yaml
from
.logging
import
add_verbosity_to_parser
,
logging_from_verbose
_logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -62,5 +59,6 @@
nmspc
=
parser
.
parse_args
()
logging_from_verbose
(
nmspc
)
list_modules
(
nmspc
.
directory
,
nmspc
.
output
)
list_modules
()
...
...
@@ -66,9 +64,9 @@
def
list_modules
():
c
=
configparser
.
ConfigParser
()
c
.
read
(
os
.
getcwd
()
+
'
/
setup.cfg
'
)
with
open
(
'
odoo_modules_list
'
)
as
odoo_modul_list
:
odoo_modul_list
.
write
(
'
,
'
.
join
(
c
.
get
(
'
odoo_scripts
'
,
'
module_list
'
).
split
()))
def
list_modules
(
filename
:
str
=
'
odoo_modules_list
'
):
c
=
configparser
.
ConfigParser
()
c
.
read
(
os
.
path
.
join
(
os
.
getcwd
()
,
'
setup.cfg
'
)
)
with
open
(
filename
,
'
w
'
)
as
f
:
f
.
write
(
'
,
'
.
join
(
c
.
get
(
'
odoo_scripts
'
,
'
module_list
'
).
split
()))
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment