You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In K5Realm's __init__ method, the use case of existing is non-obvious (as it really does two things: the base directory location and whether or not to write new configuration).
If existing is not None then it is treated as a base directory path and K5Realm.tmpdir is updated with its contents and configuration is not written. On the other hand, if existing is None, then K5Realm.tmpdir receives a newly created temporary directory, and later governs the creation of the configuration.
It seems like existing should be a boolean parameter, with tmpdir being renamed to basedir and accepted as an additional argument in __init__. This would allow K5Realm to be used to create krb5 deployments in determanistic locations. However, this is a breaking change.
Looking for public usages of existing being not-None, the only one I can find is in gssapi-console, which could be updated as it is part of the pythongssapi org.
The text was updated successfully, but these errors were encountered:
cipherboy
changed the title
k5test - K5Realm.__init__'s existing is non-obvious
K5Realm.__init__'s existing argument is non-obvious
May 11, 2018
I'm mostly fine with that. It was mostly intended as being "existing" meaning "here's the path to an existing K5Realm setup". The only issue is that it's probably not entirely obvious that existing=True and tmpdir=None is an invalid combination.
In K5Realm's
__init__
method, the use case ofexisting
is non-obvious (as it really does two things: the base directory location and whether or not to write new configuration).If existing is not
None
then it is treated as a base directory path andK5Realm.tmpdir
is updated with its contents and configuration is not written. On the other hand, if existing isNone
, thenK5Realm.tmpdir
receives a newly created temporary directory, and later governs the creation of the configuration.It seems like
existing
should be a boolean parameter, withtmpdir
being renamed tobasedir
and accepted as an additional argument in__init__
. This would allow K5Realm to be used to create krb5 deployments in determanistic locations. However, this is a breaking change.Looking for public usages of
existing
being not-None
, the only one I can find is ingssapi-console, which could be updated as it is part of the
pythongssapi
org.The text was updated successfully, but these errors were encountered: