treecompose: Fix looking for versions in empty repositories

This is kind of a confusing bit about pygobject/introspection - it
gives you a useless "success" boolean that will always be True.
Because if the function fails, it throws an exception.

Ignore the worked value, change the code to check for None in the
first function.

If the commit doesn't exist, let's just throw.