Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-772

Facter noisily outputs weight when loading external facts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 2.4.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Facter with external facts

    • Template:
    • Story Points:
      1
    • Sprint:
      Platform Client 2015-01-07

      Description

      Commit 99a00658 added the ability to provide a weight for an external fact.

      The commit also introduced an odd bug where every time an external fact is resolved, the weight of the fact is printed to the console. This is due to the following line in lib/facter/util/directory_loader.rb:

      69  data.each { |p,v| collection.add(p, :value => v) { p(weight); has_weight(weight) } }
      

      ... Where the p(weight) prints the weight - a behavior that we've never had before and doesn't seem like an intended feature of this change. Removing this print statement resolves the issue while still allowing custom weights for external facts.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                whopper William Hopper
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support