running version of openmtc

This commit is contained in:
aor-fokus 2019-01-16 16:00:14 +01:00
parent 79e7a22f98
commit be4c31a1ef
5 changed files with 12 additions and 12 deletions

View File

@ -5,7 +5,7 @@ from enum import Enum
from iso8601 import parse_date, ParseError from iso8601 import parse_date, ParseError
from operator import attrgetter from operator import attrgetter
from futile import basestring, issubclass, NOT_SET from futile import issubclass, NOT_SET
from futile.logging import LoggerMixin from futile.logging import LoggerMixin
from openmtc.model.exc import ModelError, ModelTypeError from openmtc.model.exc import ModelError, ModelTypeError

View File

@ -113,14 +113,14 @@ rm ${log_file}
################################################################################ ################################################################################
# clean binary_package # clean binary_package
binary_archive="${working_dir}/dist/${binary_prefix}.docker.tar.gz" binary_archive="${working_dir}/dist/${binary_prefix}.docker.tar.gz"
printf "### Stripping .py files..." #printf "### Stripping .py files..."
cp ${target_file} ${binary_archive} cp ${target_file} ${binary_archive}
gzip -d ${binary_archive} #gzip -d ${binary_archive}
tar --wildcards --delete -f ${binary_archive%".gz"} "*.py" #tar --wildcards --delete -f ${binary_archive%".gz"} "*.py"
gzip ${binary_archive%".gz"} #gzip ${binary_archive%".gz"}
printf "done\n" #printf "done\n"
rm ${target_file} rm ${target_file}
printf "### Created binary archive at %s.\n" ${binary_archive} #printf "### Created binary archive at %s.\n" ${binary_archive}
################################################################################ ################################################################################
# set correct permissions # set correct permissions

View File

@ -6,7 +6,7 @@ Created on 15.07.2011
from asyncore import dispatcher, loop from asyncore import dispatcher, loop
from socket import AF_INET, SOCK_STREAM, error from socket import AF_INET, SOCK_STREAM, error
from sockethelper import socket from .sockethelper import socket
from futile.exc import errorstr from futile.exc import errorstr
from collections import namedtuple from collections import namedtuple
import sys import sys
@ -38,9 +38,9 @@ def test_port(host, port, family = AF_INET, type = SOCK_STREAM):
try: try:
with socket(family, type) as s: with socket(family, type) as s:
s.connect((host, port)) s.connect((host, port))
except error, e: except error as e:
return TestResult(False, "%s (%d)" % (e.strerror, e.errno)) return TestResult(False, "%s (%d)" % (e.strerror, e.errno))
except Exception, e: except Exception as e:
return TestResult(False, errorstr(e)) return TestResult(False, errorstr(e))
return TestResult(True) return TestResult(True)

View File

@ -39,7 +39,7 @@ class HTTPSMixin(LoggerMixin):
def get_request(self): def get_request(self):
try: try:
return self.socket.accept() return self.socket.accept()
except error, e: except error as e:
self.logger.exception("Error during accept(): %s", e) self.logger.exception("Error during accept(): %s", e)
raise raise

View File

@ -5,7 +5,7 @@ import sys
import os import os
import gevent.monkey import gevent.monkey
if 'threading' in sys.modules and not os.environ.get('SUPPORT_GEVENT'): if 'threading' in sys.modules and not os.environ.get('GEVENT_SUPPORT'):
raise Exception('threading module loaded before monkey patching in ' raise Exception('threading module loaded before monkey patching in '
'gevent_main!') 'gevent_main!')