Heat the oil in a saucepan and lightly fry the onions in it. Add the carrots to the onions in the saucepan and add the stock. Let the whole thing simmer until there is little liquid left.
Add the flour to thicken and stir in very quickly so that no lumps form. Season to taste with pepper and salt.