diff --git a/common/openmtc/src/openmtc/model/__init__.py b/common/openmtc/src/openmtc/model/__init__.py index 3928035..e65c554 100644 --- a/common/openmtc/src/openmtc/model/__init__.py +++ b/common/openmtc/src/openmtc/model/__init__.py @@ -5,7 +5,7 @@ from enum import Enum from iso8601 import parse_date, ParseError from operator import attrgetter -from futile import basestring, issubclass, NOT_SET +from futile import issubclass, NOT_SET from futile.logging import LoggerMixin from openmtc.model.exc import ModelError, ModelTypeError diff --git a/create-binary-dist b/create-binary-dist index 66c6db4..853c451 100755 --- a/create-binary-dist +++ b/create-binary-dist @@ -113,14 +113,14 @@ rm ${log_file} ################################################################################ # clean binary_package binary_archive="${working_dir}/dist/${binary_prefix}.docker.tar.gz" -printf "### Stripping .py files..." +#printf "### Stripping .py files..." cp ${target_file} ${binary_archive} -gzip -d ${binary_archive} -tar --wildcards --delete -f ${binary_archive%".gz"} "*.py" -gzip ${binary_archive%".gz"} -printf "done\n" +#gzip -d ${binary_archive} +#tar --wildcards --delete -f ${binary_archive%".gz"} "*.py" +#gzip ${binary_archive%".gz"} +#printf "done\n" rm ${target_file} -printf "### Created binary archive at %s.\n" ${binary_archive} +#printf "### Created binary archive at %s.\n" ${binary_archive} ################################################################################ # set correct permissions diff --git a/futile/src/futile/net/PortTester.py b/futile/src/futile/net/PortTester.py index 56290cc..0819b4b 100644 --- a/futile/src/futile/net/PortTester.py +++ b/futile/src/futile/net/PortTester.py @@ -6,7 +6,7 @@ Created on 15.07.2011 from asyncore import dispatcher, loop from socket import AF_INET, SOCK_STREAM, error -from sockethelper import socket +from .sockethelper import socket from futile.exc import errorstr from collections import namedtuple import sys @@ -38,9 +38,9 @@ def test_port(host, port, family = AF_INET, type = SOCK_STREAM): try: with socket(family, type) as s: s.connect((host, port)) - except error, e: + except error as e: return TestResult(False, "%s (%d)" % (e.strerror, e.errno)) - except Exception, e: + except Exception as e: return TestResult(False, errorstr(e)) return TestResult(True) diff --git a/futile/src/futile/net/http/server/ssl/__init__.py b/futile/src/futile/net/http/server/ssl/__init__.py index 3a11e0c..28e4b3c 100644 --- a/futile/src/futile/net/http/server/ssl/__init__.py +++ b/futile/src/futile/net/http/server/ssl/__init__.py @@ -39,7 +39,7 @@ class HTTPSMixin(LoggerMixin): def get_request(self): try: return self.socket.accept() - except error, e: + except error as e: self.logger.exception("Error during accept(): %s", e) raise diff --git a/openmtc-gevent/src/openmtc_gevent/main.py b/openmtc-gevent/src/openmtc_gevent/main.py index 835a7ce..fa7a2d1 100644 --- a/openmtc-gevent/src/openmtc_gevent/main.py +++ b/openmtc-gevent/src/openmtc_gevent/main.py @@ -5,7 +5,7 @@ import sys import os 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 ' 'gevent_main!')