Skip to content

Commit dec88d0

Browse files
Default first arg where it can be None and was not previously
The goal here is to change all calls to methods of the form `add_cred(None)` to `add_cred()` for convenience and clarity. It has been verified that `acquire_cred_from()` can take nulls. This closes #29.
1 parent 82831c5 commit dec88d0

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

gssapi/raw/creds.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ cdef class Creds:
8080
self.raw_creds = NULL
8181

8282

83-
def acquire_cred(Name name, lifetime=None, mechs=None, usage='both'):
83+
def acquire_cred(Name name=None, lifetime=None, mechs=None, usage='both'):
8484
"""
8585
Get GSSAPI credentials for the given name and mechanisms.
8686

gssapi/raw/ext_cred_store.pyx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ cdef void c_free_key_value_set(gss_key_value_set_desc *kvset):
9292
free(kvset)
9393

9494

95-
# TODO(directxman12): some of these probably need a "not null",
96-
# but that's not clear from the wiki page
97-
def acquire_cred_from(dict store, Name name, lifetime=None,
95+
def acquire_cred_from(dict store=None, Name name=None, lifetime=None,
9896
mechs=None, usage='both'):
9997
"""Acquire credentials from the given store
10098

gssapi/raw/names.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def display_name(Name name not None, name_type=True):
163163
raise GSSError(maj_stat, min_stat)
164164

165165

166-
def compare_name(Name name1, Name name2):
166+
def compare_name(Name name1=None, Name name2=None):
167167
"""
168168
Check two GSSAPI names to see if they are the same.
169169

0 commit comments

Comments
 (0)