Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing substitution in inquire_property #196

Merged
merged 1 commit into from
Apr 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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