matplotlib/matplotlib — pull request #1163 by pwuertz (2012-08-28 20:22:38+00:00)
Title: tight_layout: fix regression for figures with non SubplotBase Axes

When encountering axes instances that do not descent from SubplotBase, tight_layout tries to print a warning, but there is a typo in that code block causing an exception and thus stopping the whole process.

Also, in my thesis I have a figure that uses an inset (`mpl_toolkits.axes_grid1.inset_locator.inset_axes`) and removed the figure borders using `tight_layout(0.0)`. This worked fine in matplotlib 1.1.1, but the current master just bails out from tight_layout when encountering the inset axes. I think showing the warning to the user is enough, the result might turn out to be just fine...