facter 4.5.0 → 4.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bc6c44e0072feade1a48b1a15c423c6028dd18d66fd3edaed7aa7ae07ac4922
4
- data.tar.gz: 452afdcc9dd049b23e43ea3623c5758c2447fec809a44680ab5928a65cd12b17
3
+ metadata.gz: eb4ad4e8f37099548b19f8b37bc43b11b2f2ba2cfe28df31ffc30b4d8b6aac87
4
+ data.tar.gz: d978305277df30b5f97116aab7d96f1935de8e35db2cee3fdab1aa28db694a78
5
5
  SHA512:
6
- metadata.gz: 77e545e417001ef58de71b4aa470ebbb4e71349d19c64eafce67268c019f41e1367b6bb00acc1c6e24586ee39f751a3f652c6227f7ccd16e300b7a4b3fbe10d2
7
- data.tar.gz: c605efaacef975278de37d8d091ab251228d4f1d8c139e103eb2b50cbf0f3d49feac1f0b8f4c9f724b2a44e25bf1d832853ec28f82d0588afebe61b8a22a02b6
6
+ metadata.gz: 9a0ebd49f8a7ddae37b97c4c2430b93f3fb18b462203daa6544bdfcdbdc28a3c4f1df5b90bbabb17a17fa2e8a1cef28f467e1b5cad70547c616e95e1051c1688
7
+ data.tar.gz: ef0687cb134a6d37e1d4a35ba8047ca134230e0834f5354fc8a3ce6463999b0f237c265b4dbf1d55f45a2cf12276f207f4c5756afd62bbcf2b61abb19ccf0eaa
@@ -93,7 +93,12 @@ module LegacyFacter
93
93
  if data == false
94
94
  log.warn "Could not interpret fact file #{fact.file}"
95
95
  elsif (data == {}) || data.nil?
96
- log.debug("Fact file #{fact.file} was parsed but no key=>value data was returned")
96
+ log.debug(
97
+ "Structured data fact file #{fact.file} was parsed but was either empty or an invalid filetype "\
98
+ '(valid filetypes are .yaml, .json, and .txt).'
99
+ )
100
+ elsif !data.is_a?(Hash)
101
+ log.error("Structured data fact file #{fact.file} was parsed but no key=>value data was returned.")
97
102
  else
98
103
  add_data(data, collection, fact, weight)
99
104
  end
@@ -19,6 +19,12 @@ module Facter
19
19
 
20
20
  matches = output.match(/System Configuration:\s+(.+?)\s+sun\d+\S+\s+(.+)/)&.captures
21
21
 
22
+ # There are circumstances (e.g. in non-global zones) when prtdiag
23
+ # will return text, but it's an error message or some other string
24
+ # that isn't parsed by the above match/capture. In that case, we
25
+ # simply return.
26
+ return if matches.nil?
27
+
22
28
  @fact_list[:manufacturer] = matches[0]&.strip
23
29
  @fact_list[:product_name] = matches[1]&.strip
24
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Facter
4
- VERSION = '4.5.0' unless defined?(VERSION)
4
+ VERSION = '4.5.1' unless defined?(VERSION)
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facter
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -1101,7 +1101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1101
1101
  - !ruby/object:Gem::Version
1102
1102
  version: '0'
1103
1103
  requirements: []
1104
- rubygems_version: 3.4.12
1104
+ rubygems_version: 3.4.20
1105
1105
  signing_key:
1106
1106
  specification_version: 4
1107
1107
  summary: Facter, a system inventory tool