Fixing a few syntax errors

This commit is contained in:
kevgliss 2015-08-03 21:16:55 -07:00
parent fc68552d0f
commit 63b1babf7b
5 changed files with 8 additions and 6 deletions

View File

@ -3,6 +3,8 @@
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
from builtins import str
from datetime import timedelta from datetime import timedelta
from flask import make_response, request, current_app from flask import make_response, request, current_app
@ -16,10 +18,10 @@ def crossdomain(origin=None, methods=None, headers=None,
if methods is not None: if methods is not None:
methods = ', '.join(sorted(x.upper() for x in methods)) methods = ', '.join(sorted(x.upper() for x in methods))
if headers is not None and not isinstance(headers, basestring): if headers is not None and not isinstance(headers, str):
headers = ', '.join(x.upper() for x in headers) headers = ', '.join(x.upper() for x in headers)
if not isinstance(origin, basestring): if not isinstance(origin, str):
origin = ', '.join(origin) origin = ', '.join(origin)
if isinstance(max_age, timedelta): if isinstance(max_age, timedelta):

View File

@ -1,5 +1,5 @@
try: try:
VERSION = __import__('pkg_resources') \ VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version .get_distribution(__name__).version
except Exception, e: except Exception as e:
VERSION = 'unknown' VERSION = 'unknown'

View File

@ -1,5 +1,5 @@
try: try:
VERSION = __import__('pkg_resources') \ VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version .get_distribution(__name__).version
except Exception, e: except Exception as e:
VERSION = 'unknown' VERSION = 'unknown'

View File

@ -1,5 +1,5 @@
try: try:
VERSION = __import__('pkg_resources') \ VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version .get_distribution(__name__).version
except Exception, e: except Exception as e:
VERSION = 'unknown' VERSION = 'unknown'

View File

@ -1,5 +1,5 @@
try: try:
VERSION = __import__('pkg_resources') \ VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version .get_distribution(__name__).version
except Exception, e: except Exception as e:
VERSION = 'unknown' VERSION = 'unknown'