From a8f40499be6405de788d12957514c87c80e146e0 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Thu, 2 Apr 2020 14:48:36 -0400 Subject: [PATCH] Fix missing substitution in inquire_property Resolves: #195 --- gssapi/_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gssapi/_utils.py b/gssapi/_utils.py index 5956ac40..0ad752ec 100644 --- a/gssapi/_utils.py +++ b/gssapi/_utils.py @@ -4,6 +4,8 @@ import six import decorator as deco +from typing import Optional + from gssapi.raw.misc import GSSError @@ -43,7 +45,7 @@ def getter(self): return property(getter, setter) -def inquire_property(name, doc=None): +def inquire_property(name: str, doc: Optional[str] = None): """Creates a property based on an inquire result This method creates a property that calls the @@ -59,7 +61,7 @@ def inquire_property(name, doc=None): def inquire_property(self): if not self._started: - msg = ("Cannot read {0} from a security context whose " + msg = (f"Cannot read {name} from a security context whose " "establishment has not yet been started.") raise AttributeError(msg)