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

:shirt: flake8

parent a7fbd57807c5
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@
import docker # apt python-docker (1.9) or pip install docker
from psycopg2 import connect, OperationalError # apt python-psycopg2
from requests.exceptions import ConnectionError
if docker.__version__ > '2.5.0':
from docker import APIClient as docker_api
......@@ -508,7 +507,7 @@
logging.debug('Starting postgresql container')
docker_client.start(pg.get('Id'))
def stop_postgresql():
logging.info('Stopping postgresql')
docker_client.stop(pg.get('Id'))
......@@ -589,7 +588,7 @@
if not restore:
return 15
logging.info("Removing dump file in docker")
call(['docker', 'exec', name, '/tmp/%s' % restore_basename])
call(['docker', 'exec', name, '/tmp/%s' % restore_basename])
if not start_postgresql and not odoo_help and restore_filename:
logging.info("Creating database %s", database)
......@@ -665,7 +664,9 @@
logging.info('Press Ctrl+C to quit')
# print docker logs of odoo
for line in docker_client.logs(odoo.get('Id'), stream=True, follow=True):
for line in docker_client.logs(
odoo.get('Id'), stream=True, follow=True
):
sys.stdout.write(line)
# Clean up, just in case
......
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