Skip to content

Commit d32d57b

Browse files
committed
Remove unnecessary error log
Signed-off-by: Shizuo Fujita <[email protected]>
1 parent 9e2fcb6 commit d32d57b

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

lib/fluent/plugin/fluent_package_update_checker.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def tags_cached?
4242
end
4343

4444
def cached_tags_path
45-
ENV["FLUENT_PACKAGE_TAGS_PATH"] ?
45+
ENV["FLUENT_PACKAGE_TAGS_PATH"] ?
4646
ENV["FLUENT_PACKAGE_TAGS_PATH"] : "#{@tmp_dir}/fluent-package-tags.json"
4747
end
4848

@@ -51,20 +51,16 @@ def release_tags_url
5151
end
5252

5353
def fetch_tags
54-
begin
55-
if tags_cached?
56-
yield JSON.parse(File.open(cached_tags_path).read)
57-
else
58-
URI.open(release_tags_url) do |resource|
59-
File.open(cached_tags_path, "w+") do |f|
60-
json = resource.read
61-
f.write(json)
62-
yield JSON.parse(json)
63-
end
54+
if tags_cached?
55+
yield JSON.parse(File.open(cached_tags_path).read)
56+
else
57+
URI.open(release_tags_url) do |resource|
58+
File.open(cached_tags_path, "w+") do |f|
59+
json = resource.read
60+
f.write(json)
61+
yield JSON.parse(json)
6462
end
6563
end
66-
rescue => e
67-
@logger.error "Failed to fetch tags", error: e
6864
end
6965
end
7066

0 commit comments

Comments
 (0)