From b99590419e052f6f4f6b6a269f5a88714d2662e7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 30 Jun 2010 20:52:38 -0400 Subject: [PATCH] Create professors if they are missing --- sitecore/prof/import.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sitecore/prof/import.py b/sitecore/prof/import.py index 23fdea8..bd8c5c4 100644 --- a/sitecore/prof/import.py +++ b/sitecore/prof/import.py @@ -115,8 +115,11 @@ class ProfessorAdder (object): self.s.publish_section('Added/updated Prof. %s' % prof.name.last) def create_prof_page(self, name): - self.s.open_nav_section(name) - return + try: + self.s.open_nav_section(name) + return + except NoSuchElementException: + pass self.s.open_nav_section('Copy of Shyamalendu Bose') old_windows = self.s.w.get_window_handles() self.s.w.find_element_by_link_text('Copy To').click() -- 2.26.2