Refiners can be adapted to process more sour blends when a longer term issue is seen or it can be routed through a 3rd party who can supply the service.
If that wasn't the case you wouldn't see contracts for off grades just written up as a static per barrel cost to TI or Brent. Of course it isn't frictionless though.