Do the best one can under given circumstances, as in
Since he can't break the contract, Bill's making a virtue of necessity. This expression first appeared in English in Chaucer's
The Knight's Tale: "Then is it wisdom, as it thinketh me, to make virtue of necessity." Also see
make the best of.