Any Port In A Storm Meaning

An unfavorable option which might well be avoided in good times but which nevertheless looks better than the alternatives at the current time.

Example: That horrible hotel was a case of any port in a storm as we couldn't find any place to spend the night.