Also this would fail if jenkins cannot be loaded (which is the case if you don't have the jenkinsapi module available).