container-registry / harbor-api-client

Assert statement used outside of tests BAN-B101
Security
Major
9 months agoa year old
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
134                                 (connection, read) timeouts.
135        """
136        method = method.upper()
137        assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"]138
139        if post_params and body:
140            raise ValueError("body parameter cannot be used with post_params parameter.")