Wikipedia says “the law of holes refers to a proverb which states that ‘if you find yourself in a hole, stop digging'”. This means, if you find yourself in an untenable position, you should stop and change, rather than exacerbate it. Wiki identifies the first use of a similar phrase and meaning in 1911 in the Washington Post. A version closer to the modern phrase has been attributed to humorist Will Rogers, and a modern version appeared in print in 1964 in The Bankers Magazine. The phrase has become popular in the UK thanks to British politician Denis Healey in the 1980s, who expressed the thought as “’when your opponent is in a hole and digging, for god’s sake don’t stop him’ or alternately ‘why would you want to take away his shovel?'” [ipglossary.com] If you sort out the “black hole” references in a google search, this political meaning seems most popular.