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.
In K5Realm's
__init__method, the use case ofexistingis non-obvious (as it really does two things: the base directory location and whether or not to write new configuration).If existing is not
Nonethen it is treated as a base directory path andK5Realm.tmpdiris updated with its contents and configuration is not written. On the other hand, if existing isNone, thenK5Realm.tmpdirreceives a newly created temporary directory, and later governs the creation of the configuration.It seems like
existingshould be a boolean parameter, withtmpdirbeing renamed tobasedirand 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
existingbeing not-None, the only one I can find is ingssapi-console, which could be updated as it is part of the
pythongssapiorg.