Skip to content

Commit

Permalink
Fix missing substitution in inquire_property
Browse files Browse the repository at this point in the history
Resolves: #195
  • Loading branch information
frozencemetery committed Apr 3, 2020
1 parent 3cb0c75 commit 5e91aa0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gssapi/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import six
import decorator as deco

from typing import Optional

from gssapi.raw.misc import GSSError


Expand Down Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 5e91aa0

Please sign in to comment.