diff --git a/app/models/key.rb b/app/models/key.rb
index 895e8d6cb9ccbab7693ceb422fa19529286760b0..580b8b732841d59fb001bddb057a57363460c71b 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -45,7 +45,7 @@ class Key < ActiveRecord::Base
       file.close
       file.unlink # deletes the temp file
     end
-    errors.add(:key, "can't be fingerprinted") if fingerprint_output.match("failed")
+    errors.add(:key, "can't be fingerprinted") if $?.exitstatus != 0
   end
 
   def set_identifier