diff --git a/lemur/decorators.py b/lemur/decorators.py index 70f8de6a..7b93ec70 100644 --- a/lemur/decorators.py +++ b/lemur/decorators.py @@ -3,6 +3,8 @@ :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. """ +from builtins import str + from datetime import timedelta 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: 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) - if not isinstance(origin, basestring): + if not isinstance(origin, str): origin = ', '.join(origin) if isinstance(max_age, timedelta): diff --git a/lemur/plugins/lemur_aws/__init__.py b/lemur/plugins/lemur_aws/__init__.py index e572596e..8ce5a7f3 100644 --- a/lemur/plugins/lemur_aws/__init__.py +++ b/lemur/plugins/lemur_aws/__init__.py @@ -1,5 +1,5 @@ try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version -except Exception, e: +except Exception as e: VERSION = 'unknown' diff --git a/lemur/plugins/lemur_cloudca/__init__.py b/lemur/plugins/lemur_cloudca/__init__.py index e572596e..8ce5a7f3 100644 --- a/lemur/plugins/lemur_cloudca/__init__.py +++ b/lemur/plugins/lemur_cloudca/__init__.py @@ -1,5 +1,5 @@ try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version -except Exception, e: +except Exception as e: VERSION = 'unknown' diff --git a/lemur/plugins/lemur_email/__init__.py b/lemur/plugins/lemur_email/__init__.py index e572596e..8ce5a7f3 100644 --- a/lemur/plugins/lemur_email/__init__.py +++ b/lemur/plugins/lemur_email/__init__.py @@ -1,5 +1,5 @@ try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version -except Exception, e: +except Exception as e: VERSION = 'unknown' diff --git a/lemur/plugins/lemur_verisign/__init__.py b/lemur/plugins/lemur_verisign/__init__.py index e572596e..8ce5a7f3 100644 --- a/lemur/plugins/lemur_verisign/__init__.py +++ b/lemur/plugins/lemur_verisign/__init__.py @@ -1,5 +1,5 @@ try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version -except Exception, e: +except Exception as e: VERSION = 'unknown'