Skip to content

Boolean values parsed on the cli by argument or enviroment are not parsed correctly #2714

Closed
@TheDJVG

Description

@TheDJVG

Description of the problem, including code/CLI snippet

Some arguments expect a boolean value but these are not actually parsed as the Config Parser only looks at the sections in the config file and expect the value

Trying to disable ssl-verify by argument:

# docker run --rm -it registry.gitlab.com/python-gitlab/python-gitlab:latest --ssl-verify false --debug user list 
Impossible to list objects (Could not find a suitable TLS CA certificate bundle, invalid path: false)

By env. var:

# docker run --rm -it -e GITLAB_SSL_VERIFY=false registry.gitlab.com/python-gitlab/python-gitlab:latest user list
Impossible to list objects (Could not find a suitable TLS CA certificate bundle, invalid path: false)

Expected Behavior

Expected SSL/TLS cert. verification to be turned off.

Actual Behavior

The string "false" is used as a path.

Specifications

  • python-gitlab version: 4.1.0
  • API version you are using (v3/v4): not applicable
  • Gitlab server version (or gitlab.com): not applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions