Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit c6ab0717 authored by Lucas Nussbaum's avatar Lucas Nussbaum

Return 'MISSING' when the microarchitecture field is empty, and improve error message.

parent d2026003
......@@ -191,6 +191,7 @@ class G5KHardwareGenerator < WikiGenerator
# For a correct sort of the column, all dates must be in the same
# format (same number of digits)
def get_date(microarchitecture)
return 'MISSING' if microarchitecture.nil?
release_dates = {
'K8' => '2003',
'K10' => '2007',
......@@ -205,7 +206,7 @@ class G5KHardwareGenerator < WikiGenerator
'Broadwell' => '2015',
}
date = release_dates[microarchitecture.to_s]
raise 'ERROR: microarchitecture not found' if date.nil?
raise "ERROR: microarchitecture not found: '#{microarchitecture.to_s}'. Add in hardware.rb" if date.nil?
date
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment