Jiri Daněk created PROTON-2224:
----------------------------------

             Summary: Unexpected arguments in `log.warn` at 
python/setuputils/misc.py
                 Key: PROTON-2224
                 URL: https://issues.apache.org/jira/browse/PROTON-2224
             Project: Qpid Proton
          Issue Type: Bug
          Components: build, python-binding
    Affects Versions: proton-c-0.31.0
            Reporter: Jiri Daněk


{code:python|title=python/setuputils/log.py}
def warn(msg):
    logger.error("Warning: " + msg)
{code}

{code:python|title=python/setuputils/misc.py}
def pkg_config_get_var(package, name):
    """Retrieve the value of the named package variable as a string
    """
    p = _call_pkg_config(['--variable=%s' % name, package])
    if not p:
        log.warn("pkg-config: var %s get failed, package %s", name, package)

> Remove 2 unexpected arguments; 'warn' expects 1 positional arguments.Why is 
> this an issue?
3 years ago L79 Bug Blocker Open Not assigned 10min effort
> Comment based-on-misra, cwe

        return ""
{code}

Forthermore, {{logger.warn}} in Python stdlib is now deprecated, so it might 
make sense to rename the function.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to