Skip to content

Commit

Permalink
Default first arg where it can be None and was not previously
Browse files Browse the repository at this point in the history
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 pythongssapi#29.
  • Loading branch information
frozencemetery committed Jan 6, 2015
1 parent 82831c5 commit cfc9f4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gssapi/raw/creds.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cdef class Creds:
self.raw_creds = NULL


def acquire_cred(Name name, lifetime=None, mechs=None, usage='both'):
def acquire_cred(Name name=None, lifetime=None, mechs=None, usage='both'):
"""
Get GSSAPI credentials for the given name and mechanisms.
Expand Down
2 changes: 1 addition & 1 deletion gssapi/raw/ext_cred_store.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cdef void c_free_key_value_set(gss_key_value_set_desc *kvset):

# TODO(directxman12): some of these probably need a "not null",
# but that's not clear from the wiki page
def acquire_cred_from(dict store, Name name, lifetime=None,
def acquire_cred_from(dict store=None, Name name=None, lifetime=None,
mechs=None, usage='both'):
"""Acquire credentials from the given store
Expand Down
2 changes: 1 addition & 1 deletion gssapi/raw/names.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def display_name(Name name not None, name_type=True):
raise GSSError(maj_stat, min_stat)


def compare_name(Name name1, Name name2):
def compare_name(Name name1=None, Name name2=None):
"""
Check two GSSAPI names to see if they are the same.
Expand Down

0 comments on commit cfc9f4e

Please sign in to comment.