Skip to content

Commit 1ec7353

Browse files
committed
fix broken tests on renaming feature
1 parent 1f0ea0f commit 1ec7353

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/logstash/inputs/redis.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,11 @@ def connect
156156
redis = new_redis_instance
157157

158158
# register any renamed Redis commands
159-
client_command_map = redis.client.command_map
160-
@command_map.each do |name, renamed|
161-
client_command_map[name.to_sym] = renamed.to_sym
159+
if @command_map.any?
160+
client_command_map = redis.client.command_map
161+
@command_map.each do |name, renamed|
162+
client_command_map[name.to_sym] = renamed.to_sym
163+
end
162164
end
163165

164166
load_batch_script(redis) if batched? && is_list_type?

0 commit comments

Comments
 (0)