Skip to content

Commit 305d25b

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. This closes #29.
1 parent 9e06103 commit 305d25b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cdef void c_free_key_value_set(gss_key_value_set_desc *kvset):
9494

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

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)