Commit 3dde2e79 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

wip

parent 16dd2148
......@@ -6,7 +6,7 @@ import argparse
import csv
import datetime
import json
import httplib
from six.moves import http_client as httplib
import os
import shutil
import socket
......@@ -15,7 +15,7 @@ import sys
import time
import traceback
from six.moves.urllib.request import urlopen
import urlparse
from six.moves.urllib.parse import urlparse
import uuid
def createStatusItem(item_directory, instance_name, callback, date, link, status):
......@@ -150,7 +150,7 @@ def main():
some_notification_failed = False
for notif_url in args.notification_url:
notification_url = urlparse.urlparse(notif_url)
notification_url = urlparse(notif_url)
notification_port = notification_url.port
if notification_port is None:
......
......@@ -29,7 +29,7 @@
from .resiliencytestsuite import ResiliencyTestSuite
import base64
import cookielib
from six.moves import http_cookiejar as cookielib
import json
from lxml import etree
import random
......
......@@ -2,13 +2,12 @@
# vim: set et sts=2:
# pylint: disable-msg=W0311,C0301,C0103,C0111,R0904,R0903
import ConfigParser
from six.moves import configparser
import datetime
import flask
import logging
import logging.handlers
import os
import urlparse
from slapos.htpasswd import HtpasswdFile
from slapos.runner.process import setHandler
import sys
......@@ -36,7 +35,7 @@ class Config:
self.configuration_file_path = os.path.abspath(os.getenv('RUNNER_CONFIG'))
# Load configuration file
configuration_parser = ConfigParser.SafeConfigParser()
configuration_parser = configparser.SafeConfigParser()
configuration_parser.read(self.configuration_file_path)
for section in ("slaprunner", "slapos", "slapproxy", "slapformat",
......@@ -152,10 +151,10 @@ def serve(config):
startProxy(app.config)
app.logger.info('Running slapgrid...')
if app.config['auto_deploy_instance'] in TRUE_VALUES:
import thread
from six.moves import _thread
# XXX-Nicolas: Hack to be sure that supervisord has started
# before any communication with it, so that gunicorn doesn't exit
thread.start_new_thread(waitForRun, (app.config,))
_thread.start_new_thread(waitForRun, (app.config,))
config.logger.info('Done.')
app.wsgi_app = ProxyFix(app.wsgi_app)
......@@ -166,7 +165,7 @@ def waitForRun(config):
def getUpdatedParameter(self, var):
configuration_parser = ConfigParser.SafeConfigParser()
configuration_parser = configparser.SafeConfigParser()
configuration_file_path = os.path.abspath(os.getenv('RUNNER_CONFIG'))
configuration_parser.read(configuration_file_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment