From c7f9f7e285bfd734993a805d03258691376747f3 Mon Sep 17 00:00:00 2001 From: Alex Reimers Date: Tue, 28 May 2019 15:15:13 -0600 Subject: [PATCH 1/2] Changing exc.message[0] to str(e) for python3 compatibility --- flask_kerberos.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_kerberos.py b/flask_kerberos.py index 9d68ac2..133fdcf 100755 --- a/flask_kerberos.py +++ b/flask_kerberos.py @@ -32,7 +32,7 @@ def init_kerberos(app, service='HTTP', hostname=gethostname()): try: principal = kerberos.getServerPrincipalDetails(service, hostname) except kerberos.KrbError as exc: - app.logger.warn("Kerberos: %s" % exc.message[0]) + app.logger.warn("Kerberos: %s" % str(e)) else: app.logger.info("Kerberos: server is %s" % principal) diff --git a/setup.py b/setup.py index 5c77c67..f9083ee 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ from setuptools import setup setup(name='Flask-Kerberos', - version='1.0.4', + version='1.0.5', url='http://github.com/mkomitee/flask-kerberos', license='BSD', author='Michael Komitee', From c0b4179d19ecf7cbe903b2536372cbde51726500 Mon Sep 17 00:00:00 2001 From: Alex Reimers Date: Tue, 28 May 2019 15:52:42 -0600 Subject: [PATCH 2/2] e -> exc --- flask_kerberos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_kerberos.py b/flask_kerberos.py index 133fdcf..84320e0 100755 --- a/flask_kerberos.py +++ b/flask_kerberos.py @@ -32,7 +32,7 @@ def init_kerberos(app, service='HTTP', hostname=gethostname()): try: principal = kerberos.getServerPrincipalDetails(service, hostname) except kerberos.KrbError as exc: - app.logger.warn("Kerberos: %s" % str(e)) + app.logger.warn("Kerberos: %s" % str(exc)) else: app.logger.info("Kerberos: server is %s" % principal)