Raising UnknownInfrastructureException instead of NameError

Enables unittest to catch it in tests