Here you should catch an ImportError as the jenkinsapi might not be defined.