Skip to content

K5Realm.__init__'s existing argument is non-obvious #6

Open
@cipherboy

Description

@cipherboy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions