Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2224

Unexpected arguments in `log.warn` at python/setuputils/misc.py

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • proton-c-0.31.0
    • None
    • build, python-binding
    • None

    Description

      python/setuputils/log.py
      def warn(msg):
          logger.error("Warning: " + msg)
      
      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 ""
      

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: