Skip to content
Snippets Groups Projects
Commit edf6e3a16f68 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: remove six imports from scripts run directly from the user

parent 14256d6c0a58
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,10 @@
compatibility.
"""
import argparse
import configparser
import logging
import os
import subprocess
import sys
import yaml
......@@ -7,10 +8,9 @@
import logging
import os
import subprocess
import sys
import yaml
from six.moves import configparser
_logger = logging.getLogger(__name__)
......
......@@ -14,7 +14,7 @@
from subprocess import call, check_output
import sys
from six.moves import configparser
import configparser
import docker # apt python-docker (1.9) or pip install docker
......
......@@ -9,12 +9,7 @@
here=$(dirname $0)
project_home=$(cd $here && cd .. && echo $PWD)
static_dir=$project_home/static/
if type "python3" > /dev/null;
then
odoo_modules="$(python3 -B -c "import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")"
else
odoo_modules="$(python2 -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")"
fi
odoo_modules="$(python3 -B -c "import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")"
# Delete odoo modules temp directory
if [[ -n $odoo_modules ]];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment