The refineries could change their configuration,
there is no very strict formula (we are not living in 20th century anymore), however changing the refinery configuration (in old oil refineries) results in variation of quality and quantity of the produced petrochemical products, for example: Light Distillates: Gasoline, Naphtha; Middle Distillates: Gas oil, diesel, kerosene, etc... anyway, that's almost an obsolete concept as today's refineries are able to handle any range of crude oil with the same output. And there is no shortage of crude oil similar to that of Iran's in the market either, Iraq's oil that is being produced in shared-oil wells with Iran has the similar quality to that of Iranian oil. However, as I said diversification of resources remains the wisest economic decision. Be it oil, gas, electricity, etc...
Read these two papers if you're really interested to know more about the subject of "energy diversification"
https://www.imf.org/external/pubs/ft/wp/2011/wp1139.pdf
http://www.fas.org/sgp/crs/row/R42405.pdf