Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5591

undefined local variable or method `data' for Puppet::Provider::Package::Windows::Package:Class

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • PUP 4.0.0
    • PUP 4.3.2
    • Windows 2012 R2 agent

    • 2
    • Windows 2016-01-13
    • Reviewed
    • Attempting to read REG_BINARY registry data would previously cause Puppet to crash on Windows. This no longer occurs.

    Description

      On a Windows 2012 R2 node, the command: "puppet resource package --trace"

      generates the following error:

      Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
      Error: Could not run: undefined local variable or method `data' for Puppet::Provider::Package::Windows::Package:Class
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/windows/registry.rb:216:in `block in read'

      Line 216 in puppet/util/windows/registry.rb is this:
      result = [ type, data.read_bytes(0, byte_length) ]

      That line uses "data.read_bytes", but all the other lines in that case statement use "data_ptr.read_bytes". This appears to be an oversight.

      Attachments

        Issue Links

          Activity

            People

              ryan.gard Ryan Gard
              tim.purkerson Tim Purkerson
              Ryan Gard Ryan Gard
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support