any port in a storm

Any port in a storm (as the sailors say) (in an emergency, we will accept help from any source and in any place, even from an unpleasant person; if you cannot get what you want, get what you can) — на безрыбье и рак рыба; выбирать не приходится;

Example 1: I don't even like him very much, but I had to move out of my flat and he offered me a place to stay. Any port in a storm, as they say. (CIDI)

Example 2: "I'm afraid I've run out of coffee. I can only offer you tea." — "That's all right. Any port in a storm."
( ...Ну, тут уж выбирать не приходится.)

We use this expression when something that we want or need is not available and we must have something else instead. Beggars can't be choosers has a similar meaning

see also
[beggars can't be choosers]

[Hobson's choice]
make do with sth
settle for
[catch as catch can]