M #-: Improve version parser for qemu-nbd

This commit is contained in:
Ruben S. Montero committed 2020-05-07 17:55:43 +02:00
1 parent b23a3713a6
commit bdd325a6f8
1 file changed
+1 -2
+1 -2
View File
@@ -85,8 +85,7 @@ class Qcow2Mapper < Mapper
return "0.0.0" unless rc.zero?
match_v = out.match(/qemu-nbd ((?:[0-9]+\.?)+) \(/)
match_v = out.match(/qemu-nbd version (.*)$/) if match_v.nil?
match_v = out.match(/qemu-nbd(?: version)? ((?:[0-9]+\.?)+)\s?\(?.*$/)
return "0.0.0" if match_v.nil?