Simplify SSH fingerprint regexp extraction

[\d\h] is the same as \h
This commit is contained in:
Ciro Santilli 2014-12-04 16:31:12 +01:00
parent c8bb171664
commit 5dbe94dc9b

View file

@ -89,7 +89,7 @@ class Key < ActiveRecord::Base
end
if cmd_status.zero?
cmd_output.gsub /([\d\h]{2}:)+[\d\h]{2}/ do |match|
cmd_output.gsub /(\h{2}:)+\h{2}/ do |match|
self.fingerprint = match
end
end