python: Raise exception if handle has bad repo type configured (RhBug: 988013)