Skip to content

Two modernization nitpicks #163

@mcepl

Description

@mcepl

https://github.com/modauthgssapi/mod_auth_gssapi/blob/1a3598e359abf5356533c8802397c3dc357fdc9c/tests/magtests.py#L10

What is the lowest supported version of Python required? If it is at least 2.6, then you can throw away strings.Template templates and use str.format() (just don’t forget to double { and } where you want them; otherwise it is just matter of %s/\${/{/gc command). Whole strings module has been deprecated for years.

Also, if it is at least 2.7 then you can replace all those complicated constructs with subprocess.Popen() with if subprocess.call(...) != 0:. A way less readable IMHO and you save some unnecessary variables.

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